tx · 9oRr1R77X9UFaYcZEGb9BpRSJFDVPzHseyZr8xcWrVX2 3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh: -0.03800000 Waves 2024.12.14 22:40 [3414697] smart account 3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh > SELF 0.00000000 Waves
{ "type": 13, "id": "9oRr1R77X9UFaYcZEGb9BpRSJFDVPzHseyZr8xcWrVX2", "fee": 3800000, "feeAssetId": null, "timestamp": 1734205307868, "version": 2, "chainId": 84, "sender": "3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh", "senderPublicKey": "3QtfC1XbLZXdeawMDeSERy9vvjUmj1XYd2GFmrvx7pWQ", "proofs": [ "46BywQdQ4LvwMSAhWBstpZXaKxwGbikcKXkjQ2doncNXXwcaDG2BCghP9oVJHDz8CBijanSVqRB3XnzRSUcqvv1g" ], "script": "base64:BgJXCAISABIECgIICBIDCgEEEgMKAQESABIFCgMIAQQSABIDCgEBEgASBAoCCAESABIDCgEIEgMKAQgSBAoCCAESAwoBCBIDCgEIEgASAwoBCBIAEgASABIAkAEAA1NFUAICX18ABU1VTFQ2AMCEPQAFTVVMVDcAgK3iBAAFTVVMVDgAgMLXLwAGTVVMVDE0AICA6YOx3hYACkRBWV9NSUxMSVMAgLiZKQAVVVNEVDJBQ1JFU19NVUxUSVBMSUVSAAoAE09ORV9QRVJDRU5UX0RJVklTT1IAZAAMUkFORE9NX0RFTEFZAAIAFE5GVF9DSEVTVF9QUklDRV9VU0RUAMCWsQIABWNoYWluCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABABdEQUlMWV9QUk9NT19TVEFSVF9CTE9DSwQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMACA75ECAwkAAAIBAVQFByRtYXRjaDAAwKbQAQkAAgECDVVua25vd24gY2hhaW4AFURBSUxZX1BST01PX0VORF9CTE9DSwQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoM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UCJGEJAAIBAhNMaXN0IHNpemUgZXhjZWVkcyA2CQEFJGYwXzICCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECBQUkYWNjMAAAAAEAAgADAAQABQAGCQCUCgIJAMwIAgkBC1N0cmluZ0VudHJ5AgULa2V5UHJvbW9NYXAIBQVkcmF3cwJfMwkAzAgCCQEMSW50ZWdlckVudHJ5AgUUa2V5VG90YWxQcm9tb1RpY2tldHMIBQVkcmF3cwJfMQkAzAgCCQELU3RyaW5nRW50cnkCCQEPa2V5RGFpbHlXaW5uZXJzAQUFdG9kYXkJALkJAggFBWRyYXdzAl80AgFfBQNuaWwAAAAgriF9", "height": 3414697, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4AXeDRPKs9YfeFWjmdCBfQN7YmvdHSgVLqbPBE97G5KK Next: 6uedwq4r2S4T3BUsVkRYiVsA7cXRgQ4cPqPUgwDEtKaP Diff:
Old | New | Differences | |
---|---|---|---|
191 | 191 | func keyDailyWinners (day) = ("dailyWinners_" + toString(day)) | |
192 | 192 | ||
193 | 193 | ||
194 | + | let promoNumPrizes = 6 | |
195 | + | ||
196 | + | let promoAwardPerRound = [0, 500000000, 100000000, 100000000, 100000000, 100000000] | |
197 | + | ||
194 | 198 | func asInt (v) = match v { | |
195 | 199 | case n: Int => | |
196 | 200 | n | |
347 | 351 | ||
348 | 352 | let names = ["Gold shovel", "Pickaxe"] | |
349 | 353 | ||
350 | - | let descriptions = ["Reward for early birds", "Increases FarmPower"] | |
354 | + | let descriptions = ["Reward for early birds", "Increases FarmPower", "New Year promo reward"] | |
351 | 355 | ||
352 | 356 | let idxDescrShovel = 0 | |
353 | 357 | ||
354 | 358 | let idxDescrPickaxe = 1 | |
359 | + | ||
360 | + | let idxDescrMitten = 2 | |
355 | 361 | ||
356 | 362 | let rarityThresholds = [5, 10, 20] | |
357 | 363 | ||
361 | 367 | ||
362 | 368 | let idxThresholdL = 2 | |
363 | 369 | ||
364 | - | let namez = ["SHOVEL", "PICKAXE"] | |
370 | + | let namez = ["SHOVEL", "PICKAXE", "MITTEN"] | |
365 | 371 | ||
366 | 372 | let idxNameShovel = 0 | |
367 | 373 | ||
368 | 374 | let idxNamePickaxe = 1 | |
369 | 375 | ||
370 | - | let contentKeyz = ["contentPickaxeC", "contentPickaxeU", "contentPickaxeL", "contentPickaxeE", "contentShovelP"] | |
376 | + | let idxNameMitten = 2 | |
377 | + | ||
378 | + | let contentKeyz = ["contentPickaxeC", "contentPickaxeU", "contentPickaxeL", "contentPickaxeE", "contentShovelP", "contentMittenP"] | |
371 | 379 | ||
372 | 380 | let idxKeyC = 0 | |
373 | 381 | ||
374 | - | let idxKeyP = 4 | |
382 | + | let idxKeySP = 4 | |
383 | + | ||
384 | + | let idxKeyMP = 5 | |
375 | 385 | ||
376 | 386 | let rarityNames = ["Common", "Uncommon", "Legendary", "Epic", "Promo"] | |
377 | 387 | ||
385 | 395 | ||
386 | 396 | let idxRarityP = 4 | |
387 | 397 | ||
388 | - | let collectionz = ["Digging tools"] | |
398 | + | let collectionz = ["Digging tools", "New Year gifts"] | |
389 | 399 | ||
390 | 400 | let idxCollDig = 0 | |
401 | + | ||
402 | + | let idxCollNNewYear = 1 | |
391 | 403 | ||
392 | 404 | let bonusTypez = ["FarmPower"] | |
393 | 405 | ||
481 | 493 | else false) | |
482 | 494 | then throw((((("You have only " + fixedPoint(oldBonus, 4)) + "% bonus, and tried to unstake ") + fixedPoint(-(bonusDelta), 4)) + "%")) | |
483 | 495 | else { | |
484 | - | let $ | |
485 | - | let newBonusedFp = $ | |
486 | - | let ignored = $ | |
496 | + | let $t064656564 = getFarmingPowerByAcresAndBonus(newAcresAmount, (oldBonus + bonusDelta)) | |
497 | + | let newBonusedFp = $t064656564._1 | |
498 | + | let ignored = $t064656564._2 | |
487 | 499 | let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0) | |
488 | 500 | let acresActions = if ((amt == 0)) | |
489 | 501 | then nil | |
576 | 588 | if ((nftNumber >= limit)) | |
577 | 589 | then throw((("You can stake max " + toString(limit)) + " of such NFTs")) | |
578 | 590 | else { | |
579 | - | let $ | |
580 | - | let actions = $ | |
581 | - | let wlgClaimedAmount = $ | |
591 | + | let $t01084310919 = stakeUnstakeAcresInternal(0, addr, bonus6) | |
592 | + | let actions = $t01084310919._1 | |
593 | + | let wlgClaimedAmount = $t01084310919._2 | |
582 | 594 | $Tuple2((((actions :+ IntegerEntry(userNumKey, (nftNumber + 1))) :+ IntegerEntry(totalNumKey, (valueOrElse(getInteger(totalNumKey), 0) + 1))) :+ IntegerEntry(keyStakedTimeByAssetIdAndOwner(assetIdStr, addr), lastBlock.timestamp)), wlgClaimedAmount) | |
583 | 595 | } | |
584 | 596 | } | |
585 | 597 | ||
586 | 598 | ||
587 | - | let promoNumPrizes = 3 | |
588 | - | ||
589 | - | let promoAwardPerRound = [50000000, 25000000, 25000000] | |
590 | - | ||
591 | 599 | func stakeAcresForInternal (address,amt,shouldCleanPromo) = { | |
592 | - | let $ | |
593 | - | let actions = $ | |
594 | - | let wlgClaimedAmount = $ | |
600 | + | let $t01125411330 = stakeUnstakeAcresInternal(amt, address, 0) | |
601 | + | let actions = $t01125411330._1 | |
602 | + | let wlgClaimedAmount = $t01125411330._2 | |
595 | 603 | let promoActions = if (if ((height >= DAILY_PROMO_START_BLOCK)) | |
596 | 604 | then (DAILY_PROMO_END_BLOCK > height) | |
597 | 605 | else false) | |
691 | 699 | if ((arbReleaseTime > lastBlock.timestamp)) | |
692 | 700 | then throw(("You traded some WLGOLD, cannot unstake until " + toString(arbReleaseTime))) | |
693 | 701 | else { | |
694 | - | let $ | |
695 | - | let actions = $ | |
696 | - | let wlgClaimedAmount = $ | |
702 | + | let $t01533315413 = stakeUnstakeAcresInternal(-(amount), address, 0) | |
703 | + | let actions = $t01533315413._1 | |
704 | + | let wlgClaimedAmount = $t01533315413._2 | |
697 | 705 | $Tuple2(((actions :+ ScriptTransfer(i.caller, amount, acresAssetId)) ++ prologActions), wlgClaimedAmount) | |
698 | 706 | } | |
699 | 707 | } | |
716 | 724 | else (value(pmt.assetId) != acresAssetId)) | |
717 | 725 | then throw("ACRES payments only!") | |
718 | 726 | else { | |
719 | - | let $ | |
720 | - | let stakeActions = $ | |
721 | - | let wlgClaimedAmount = $ | |
727 | + | let $t01586415945 = stakeAcresForInternal(address, amt, false) | |
728 | + | let stakeActions = $t01586415945._1 | |
729 | + | let wlgClaimedAmount = $t01586415945._2 | |
722 | 730 | $Tuple2((stakeActions ++ prologActions), wlgClaimedAmount) | |
723 | 731 | } | |
724 | 732 | } | |
789 | 797 | then throw((("Min payment should be " + fixedPoint(MULT7, 8)) + " ACRES")) | |
790 | 798 | else { | |
791 | 799 | let addr = toString(i.caller) | |
792 | - | let $ | |
793 | - | let limitAction = $ | |
794 | - | let maxUsdt = $ | |
800 | + | let $t01801718065 = getSwapLimitAcres() | |
801 | + | let limitAction = $t01801718065._1 | |
802 | + | let maxUsdt = $t01801718065._2 | |
795 | 803 | let maxAcres = (maxUsdt * USDT2ACRES_MULTIPLIER) | |
796 | 804 | if ((acresAmount > maxAcres)) | |
797 | 805 | then throw((("You can sell max " + fixedPoint(maxAcres, 8)) + " ACRES")) | |
807 | 815 | ||
808 | 816 | @Callable(i) | |
809 | 817 | func sellAcresREADONLY (address,acresAmount) = { | |
810 | - | let $ | |
811 | - | let limitAction = $ | |
812 | - | let maxUsdt = $ | |
818 | + | let $t01856118609 = getSwapLimitAcres() | |
819 | + | let limitAction = $t01856118609._1 | |
820 | + | let maxUsdt = $t01856118609._2 | |
813 | 821 | let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2) | |
814 | 822 | $Tuple2(nil, [usdtAmount, MULT7, (maxUsdt * USDT2ACRES_MULTIPLIER), 0]) | |
815 | 823 | } | |
870 | 878 | let req = invoke(oldAcresAddress, "requestAcresCallback", [(((rr._1 + rr._2) + rr._3) + rr._4)], nil) | |
871 | 879 | if ((req == req)) | |
872 | 880 | then { | |
873 | - | let $ | |
874 | - | let nftActions = $ | |
875 | - | let nftAssetId = $ | |
881 | + | let $t02112321262 = issueNftCustom(idxNameShovel, idxKeySP, idxCollDig, idxRarityP, 3, idxDescrShovel, idxBonusTypeFp, i.caller) | |
882 | + | let nftActions = $t02112321262._1 | |
883 | + | let nftAssetId = $t02112321262._2 | |
876 | 884 | $Tuple6(rr._1, rr._2, rr._3, rr._4, rr._5, nftActions) | |
877 | 885 | } | |
878 | 886 | else throw("Strict value is not equal to itself.") | |
943 | 951 | let userFpKey = keyFarmingPowerByUser(address) | |
944 | 952 | let oldFp = valueOrElse(getInteger(userFpKey), 0) | |
945 | 953 | let userBonus = valueOrElse(getInteger(acres2Contract, keyUserFullBonus(address)), 0) | |
946 | - | let $ | |
947 | - | let newBonusedFp = $ | |
948 | - | let ignored = $ | |
954 | + | let $t02353323620 = getFarmingPowerByAcresAndBonus(newAcresAmount, userBonus) | |
955 | + | let newBonusedFp = $t02353323620._1 | |
956 | + | let ignored = $t02353323620._2 | |
949 | 957 | let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0) | |
950 | 958 | let newTotalFp = ((oldTotalFp + newBonusedFp) - oldFp) | |
951 | 959 | $Tuple2(nil, [oldFp, newBonusedFp, oldTotalFp, newTotalFp]) | |
957 | 965 | func issuePickC1 (forAddress) = if ((i.caller != wlgContract)) | |
958 | 966 | then throw("Permission denied") | |
959 | 967 | else issueNftCustom(idxNamePickaxe, idxKeyC, idxCollDig, idxRarityC, 1, idxDescrPickaxe, idxBonusTypeFp, addressFromStringValue(forAddress)) | |
968 | + | ||
969 | + | ||
970 | + | ||
971 | + | @Callable(i) | |
972 | + | func issueMittenP (forAddress) = if ((i.caller != this)) | |
973 | + | then throw("Permission denied") | |
974 | + | else issueNftCustom(idxNameMitten, idxKeyMP, idxCollNNewYear, idxRarityP, 3, idxDescrMitten, idxBonusTypeFp, addressFromStringValue(forAddress)) | |
960 | 975 | ||
961 | 976 | ||
962 | 977 | ||
987 | 1002 | let listAction = StringEntry(nftsKey, makeString_2C((nfts :+ assetIdStr), "_")) | |
988 | 1003 | if ((asset.issuer == this)) | |
989 | 1004 | then { | |
990 | - | let $ | |
991 | - | let actions = $ | |
992 | - | let wlgClaimedAmount = $ | |
1005 | + | let $t02532025510 = stakeNftInternal(addr, assetIdStr, (bonusByDescription(value(asset.description)) * 10000), keyUserWlNftNumber(addr), keyWlNftTotalStaked, MAX_WL_NFTS) | |
1006 | + | let actions = $t02532025510._1 | |
1007 | + | let wlgClaimedAmount = $t02532025510._2 | |
993 | 1008 | $Tuple2(((prologActions ++ actions) :+ listAction), wlgClaimedAmount) | |
994 | 1009 | } | |
995 | 1010 | else if ((isArkimalIssued(asset) == "")) | |
996 | 1011 | then throw("Only WavesLands and Arkimals NFT tokens are accepted") | |
997 | 1012 | else { | |
998 | - | let $ | |
999 | - | let actions = $ | |
1000 | - | let wlgClaimedAmount = $ | |
1013 | + | let $t02569125842 = stakeNftInternal(addr, assetIdStr, ARK_NFT_BONUS, keyUserArkNftNumber(addr), keyArkNftTotalStaked, MAX_ARK_NFTS) | |
1014 | + | let actions = $t02569125842._1 | |
1015 | + | let wlgClaimedAmount = $t02569125842._2 | |
1001 | 1016 | $Tuple2(((prologActions ++ actions) :+ listAction), wlgClaimedAmount) | |
1002 | 1017 | } | |
1003 | 1018 | } | |
1034 | 1049 | then { | |
1035 | 1050 | let wlNftNumber = valueOrElse(getInteger(keyUserWlNftNumber(addr)), 0) | |
1036 | 1051 | let bonusVal = (bonusByDescription(value(asset.description)) * 10000) | |
1037 | - | let $ | |
1038 | - | let actions = $ | |
1039 | - | let wlgClaimedAmount = $ | |
1052 | + | let $t02700727086 = stakeUnstakeAcresInternal(0, addr, -(bonusVal)) | |
1053 | + | let actions = $t02700727086._1 | |
1054 | + | let wlgClaimedAmount = $t02700727086._2 | |
1040 | 1055 | $Tuple2(((((((actions :+ listAction) :+ IntegerEntry(keyUserWlNftNumber(addr), (wlNftNumber - 1))) :+ IntegerEntry(keyWlNftTotalStaked, max([0, (valueOrElse(getInteger(keyWlNftTotalStaked), 0) - 1)]))) :+ DeleteEntry(keyStakedTimeByAssetIdAndOwner(toBase58String(assetId), addr))) :+ ScriptTransfer(i.caller, 1, assetId)) ++ prologActions), wlgClaimedAmount) | |
1041 | 1056 | } | |
1042 | 1057 | else { | |
1045 | 1060 | then throw("Only WavesLands and Arkimals NFT tokens are accepted") | |
1046 | 1061 | else { | |
1047 | 1062 | let arkNftNumber = valueOrElse(getInteger(keyUserArkNftNumber(addr)), 0) | |
1048 | - | let $ | |
1049 | - | let actions = $ | |
1050 | - | let wlgClaimedAmount = $ | |
1063 | + | let $t02774627830 = stakeUnstakeAcresInternal(0, addr, -(ARK_NFT_BONUS)) | |
1064 | + | let actions = $t02774627830._1 | |
1065 | + | let wlgClaimedAmount = $t02774627830._2 | |
1051 | 1066 | $Tuple2((((((actions :+ listAction) :+ IntegerEntry(keyUserArkNftNumber(addr), (arkNftNumber - 1))) :+ DeleteEntry(keyStakedTimeByAssetIdAndOwner(toBase58String(assetId), addr))) :+ ScriptTransfer(i.caller, 1, assetId)) ++ prologActions), wlgClaimedAmount) | |
1052 | 1067 | } | |
1053 | 1068 | } | |
1059 | 1074 | ||
1060 | 1075 | ||
1061 | 1076 | @Callable(i) | |
1062 | - | func exchangeNFTs () = { | |
1063 | - | let prologActions = prolog(i) | |
1064 | - | if ((3 > size(i.payments))) | |
1065 | - | then throw("Min one WLGOLD and 2 NFT payments allowed") | |
1066 | - | else if ((size(i.payments) > 10)) | |
1067 | - | then throw("Max one WLGOLD and 9 NFT payments allowed") | |
1068 | - | else { | |
1069 | - | let addr = toString(i.caller) | |
1070 | - | func addUp (acc,pmt) = { | |
1071 | - | let assetId = valueOrErrorMessage(pmt.assetId, "WAVES payments not allowed") | |
1072 | - | if ((assetId == wlgAssetId)) | |
1073 | - | then $Tuple4((acc._1 + pmt.amount), acc._2, acc._3, acc._4) | |
1074 | - | else { | |
1075 | - | let asset = value(assetInfo(assetId)) | |
1076 | - | if ((asset.issuer != this)) | |
1077 | - | then throw("Only WL-issued NFTs allowed") | |
1078 | - | else { | |
1079 | - | let rarityIx = rarityIdxByDescriprion(value(asset.description)) | |
1080 | - | if (if ((acc._4 > 0)) | |
1081 | - | then (rarityIx != acc._4) | |
1082 | - | else false) | |
1083 | - | then throw("You can exchange only NFTs of the same rarity") | |
1084 | - | else { | |
1085 | - | let bonusPerc = bonusByDescription(value(asset.description)) | |
1086 | - | $Tuple4(acc._1, (acc._2 + bonusPerc), (acc._3 :+ Burn(assetId, 1)), rarityIx) | |
1087 | - | } | |
1088 | - | } | |
1089 | - | } | |
1090 | - | } | |
1077 | + | func exchangeNFTs () = if ((i.caller != this)) | |
1078 | + | then throw("Temporary disabled") | |
1079 | + | else { | |
1080 | + | let prologActions = prolog(i) | |
1081 | + | if ((3 > size(i.payments))) | |
1082 | + | then throw("Min one WLGOLD and 2 NFT payments allowed") | |
1083 | + | else if ((size(i.payments) > 10)) | |
1084 | + | then throw("Max one WLGOLD and 9 NFT payments allowed") | |
1085 | + | else { | |
1086 | + | let addr = toString(i.caller) | |
1087 | + | func addUp (acc,pmt) = { | |
1088 | + | let assetId = valueOrErrorMessage(pmt.assetId, "WAVES payments not allowed") | |
1089 | + | if ((assetId == wlgAssetId)) | |
1090 | + | then $Tuple4((acc._1 + pmt.amount), acc._2, acc._3, acc._4) | |
1091 | + | else { | |
1092 | + | let asset = value(assetInfo(assetId)) | |
1093 | + | if ((asset.issuer != this)) | |
1094 | + | then throw("Only WL-issued NFTs allowed") | |
1095 | + | else { | |
1096 | + | let rarityIx = rarityIdxByDescriprion(value(asset.description)) | |
1097 | + | if (if ((acc._4 > 0)) | |
1098 | + | then (rarityIx != acc._4) | |
1099 | + | else false) | |
1100 | + | then throw("You can exchange only NFTs of the same rarity") | |
1101 | + | else { | |
1102 | + | let bonusPerc = bonusByDescription(value(asset.description)) | |
1103 | + | $Tuple4(acc._1, (acc._2 + bonusPerc), (acc._3 :+ Burn(assetId, 1)), rarityIx) | |
1104 | + | } | |
1105 | + | } | |
1106 | + | } | |
1107 | + | } | |
1091 | 1108 | ||
1092 | - | let $ | |
1093 | - | let $l = i.payments | |
1094 | - | let $s = size($l) | |
1095 | - | let $acc0 = $Tuple4(0, 0, nil, -1) | |
1096 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1097 | - | then $a | |
1098 | - | else addUp($a, $l[$i]) | |
1109 | + | let $t02928129497 = { | |
1110 | + | let $l = i.payments | |
1111 | + | let $s = size($l) | |
1112 | + | let $acc0 = $Tuple4(0, 0, nil, -1) | |
1113 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1114 | + | then $a | |
1115 | + | else addUp($a, $l[$i]) | |
1099 | 1116 | ||
1100 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1101 | - | then $a | |
1102 | - | else throw("List size exceeds 10") | |
1117 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1118 | + | then $a | |
1119 | + | else throw("List size exceeds 10") | |
1103 | 1120 | ||
1104 | - | $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) | |
1105 | - | } | |
1106 | - | let wlgFee = $t02890629122._1 | |
1107 | - | let totalBonus = $t02890629122._2 | |
1108 | - | let burnActions = $t02890629122._3 | |
1109 | - | let rarityIdx = $t02890629122._4 | |
1110 | - | let newRarityIdx = if ((rarityIdx == idxRarityC)) | |
1111 | - | then if ((rarityThresholds[idxThresholdC] > totalBonus)) | |
1112 | - | then idxRarityC | |
1113 | - | else if ((rarityThresholds[idxThresholdU] > totalBonus)) | |
1114 | - | then idxRarityU | |
1115 | - | else throw((("You can advance only one level of rarity, max total bonus " + toString(rarityThresholds[idxThresholdU])) + "%")) | |
1116 | - | else if ((rarityIdx == idxRarityU)) | |
1117 | - | then if ((rarityThresholds[idxThresholdU] > totalBonus)) | |
1118 | - | then idxRarityU | |
1119 | - | else if ((rarityThresholds[idxThresholdL] > totalBonus)) | |
1120 | - | then idxRarityL | |
1121 | - | else throw((("You can advance only one level of rarity, max total bonus " + toString(rarityThresholds[idxThresholdL])) + "%")) | |
1122 | - | else if ((rarityIdx == idxRarityL)) | |
1123 | - | then if ((rarityThresholds[idxThresholdL] > totalBonus)) | |
1124 | - | then idxRarityL | |
1125 | - | else idxRarityE | |
1126 | - | else if ((rarityIdx == idxRarityE)) | |
1127 | - | then idxRarityE | |
1128 | - | else if ((rarityIdx == idxRarityP)) | |
1129 | - | then throw("You can't exchange NFTs of this rarity") | |
1130 | - | else throw("Unknown rarity") | |
1131 | - | let minWlgFee = fraction(totalBonus, MULT14, getWlgPrice(0)) | |
1132 | - | let change = (wlgFee - minWlgFee) | |
1133 | - | let forTeam = (minWlgFee / 2) | |
1134 | - | let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [(minWlgFee - forTeam)], nil)) | |
1135 | - | if ((0 > change)) | |
1136 | - | then throw((("You need to attach " + fixedPoint(minWlgFee, 8)) + " WLGOLD as fee")) | |
1137 | - | else { | |
1138 | - | let changeActions = if ((change > 0)) | |
1139 | - | then [ScriptTransfer(i.caller, change, wlgAssetId)] | |
1140 | - | else nil | |
1141 | - | let $t03065930820 = issueNftCustom(idxNamePickaxe, newRarityIdx, idxCollDig, newRarityIdx, totalBonus, idxDescrPickaxe, idxBonusTypeFp, i.caller) | |
1142 | - | let issueNftActions = $t03065930820._1 | |
1143 | - | let nftAssetId = $t03065930820._2 | |
1144 | - | let burned = size(burnActions) | |
1145 | - | let burnCounterActions = if ((burned == 0)) | |
1146 | - | then nil | |
1147 | - | else [IntegerEntry(keyNftTotalBurned, (valueOrElse(getInteger(keyNftTotalBurned), 0) + burned))] | |
1148 | - | $Tuple2((((((issueNftActions ++ burnActions) ++ burnCounterActions) ++ prologActions) ++ changeActions) :+ ScriptTransfer(addressFromStringValue(getStringValue(wlgContract, teamAddrKey)), forTeam, wlgAssetId)), $Tuple2(nftAssetId, wlgRemain)) | |
1121 | + | $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) | |
1149 | 1122 | } | |
1150 | - | } | |
1151 | - | } | |
1152 | - | ||
1153 | - | ||
1154 | - | ||
1155 | - | @Callable(i) | |
1156 | - | func openNftChest () = { | |
1157 | - | let prologActions = prolog(i) | |
1158 | - | if ((size(i.payments) != 1)) | |
1159 | - | then throw("exactly 1 payment must be attached") | |
1160 | - | else { | |
1161 | - | let pmt = i.payments[0] | |
1162 | - | let wlgAmount = pmt.amount | |
1163 | - | if (if (!(isDefined(pmt.assetId))) | |
1164 | - | then true | |
1165 | - | else (value(pmt.assetId) != wlgAssetId)) | |
1166 | - | then throw("WLGOLD payments only!") | |
1167 | - | else { | |
1168 | - | let minWlgFee = fraction(NFT_CHEST_PRICE_USDT, MULT8, getWlgPrice(0)) | |
1169 | - | let change = (wlgAmount - minWlgFee) | |
1123 | + | let wlgFee = $t02928129497._1 | |
1124 | + | let totalBonus = $t02928129497._2 | |
1125 | + | let burnActions = $t02928129497._3 | |
1126 | + | let rarityIdx = $t02928129497._4 | |
1127 | + | let newRarityIdx = if ((rarityIdx == idxRarityC)) | |
1128 | + | then if ((rarityThresholds[idxThresholdC] > totalBonus)) | |
1129 | + | then idxRarityC | |
1130 | + | else if ((rarityThresholds[idxThresholdU] > totalBonus)) | |
1131 | + | then idxRarityU | |
1132 | + | else throw((("You can advance only one level of rarity, max total bonus " + toString(rarityThresholds[idxThresholdU])) + "%")) | |
1133 | + | else if ((rarityIdx == idxRarityU)) | |
1134 | + | then if ((rarityThresholds[idxThresholdU] > totalBonus)) | |
1135 | + | then idxRarityU | |
1136 | + | else if ((rarityThresholds[idxThresholdL] > totalBonus)) | |
1137 | + | then idxRarityL | |
1138 | + | else throw((("You can advance only one level of rarity, max total bonus " + toString(rarityThresholds[idxThresholdL])) + "%")) | |
1139 | + | else if ((rarityIdx == idxRarityL)) | |
1140 | + | then if ((rarityThresholds[idxThresholdL] > totalBonus)) | |
1141 | + | then idxRarityL | |
1142 | + | else idxRarityE | |
1143 | + | else if ((rarityIdx == idxRarityE)) | |
1144 | + | then idxRarityE | |
1145 | + | else if ((rarityIdx == idxRarityP)) | |
1146 | + | then throw("You can't exchange NFTs of this rarity") | |
1147 | + | else throw("Unknown rarity") | |
1148 | + | let minWlgFee = fraction(totalBonus, MULT14, getWlgPrice(0)) | |
1149 | + | let change = (wlgFee - minWlgFee) | |
1170 | 1150 | let forTeam = (minWlgFee / 2) | |
1171 | 1151 | let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [(minWlgFee - forTeam)], nil)) | |
1172 | 1152 | if ((0 > change)) | |
1175 | 1155 | let changeActions = if ((change > 0)) | |
1176 | 1156 | then [ScriptTransfer(i.caller, change, wlgAssetId)] | |
1177 | 1157 | else nil | |
1178 | - | let addr = toString(i.caller) | |
1179 | - | let finishKey = keyCommit(addr) | |
1180 | - | let finishBlock = valueOrErrorMessage(getInteger(finishKey), "You have to commitForRandom() first!") | |
1181 | - | if ((finishBlock > height)) | |
1182 | - | then throw(("Random number is not ready yet, wait until height = " + toString(finishBlock))) | |
1183 | - | else { | |
1184 | - | let entropy = value(value(blockInfoByHeight(finishBlock)).vrf) | |
1185 | - | let salt = fromBase58String(split(valueOrElse(getString(keyCurWeekTxIdByUser(addr)), "42_DEFAULT"), "_")[1]) | |
1186 | - | let rand = getRandomNumber(100, salt, entropy) | |
1187 | - | let $t03283933111 = if ((84 > rand)) | |
1188 | - | then $Tuple2(1, idxRarityC) | |
1189 | - | else if ((98 > rand)) | |
1190 | - | then $Tuple2(5, idxRarityU) | |
1191 | - | else $Tuple2(10, idxRarityL) | |
1192 | - | let bonus = $t03283933111._1 | |
1193 | - | let rarityIdx = $t03283933111._2 | |
1194 | - | let $t03311433264 = issueNftCustom(idxNamePickaxe, rarityIdx, idxCollDig, rarityIdx, bonus, idxDescrPickaxe, idxBonusTypeFp, i.caller) | |
1195 | - | let issueNftActions = $t03311433264._1 | |
1196 | - | let nftAssetId = $t03311433264._2 | |
1197 | - | $Tuple2(((((issueNftActions ++ prologActions) ++ changeActions) :+ ScriptTransfer(addressFromStringValue(getStringValue(wlgContract, teamAddrKey)), forTeam, wlgAssetId)) :+ DeleteEntry(finishKey)), $Tuple2(nftAssetId, wlgRemain)) | |
1198 | - | } | |
1158 | + | let $t03103431195 = issueNftCustom(idxNamePickaxe, newRarityIdx, idxCollDig, newRarityIdx, totalBonus, idxDescrPickaxe, idxBonusTypeFp, i.caller) | |
1159 | + | let issueNftActions = $t03103431195._1 | |
1160 | + | let nftAssetId = $t03103431195._2 | |
1161 | + | let burned = size(burnActions) | |
1162 | + | let burnCounterActions = if ((burned == 0)) | |
1163 | + | then nil | |
1164 | + | else [IntegerEntry(keyNftTotalBurned, (valueOrElse(getInteger(keyNftTotalBurned), 0) + burned))] | |
1165 | + | $Tuple2((((((issueNftActions ++ burnActions) ++ burnCounterActions) ++ prologActions) ++ changeActions) :+ ScriptTransfer(addressFromStringValue(getStringValue(wlgContract, teamAddrKey)), forTeam, wlgAssetId)), $Tuple2(nftAssetId, wlgRemain)) | |
1199 | 1166 | } | |
1200 | 1167 | } | |
1201 | - | } | |
1202 | - | } | |
1168 | + | } | |
1203 | 1169 | ||
1204 | 1170 | ||
1205 | 1171 | ||
1206 | 1172 | @Callable(i) | |
1207 | - | func commitForRandom () = { | |
1208 | - | let prologActions = prolog(i) | |
1209 | - | let addr = toString(i.caller) | |
1210 | - | let finishKey = keyCommit(addr) | |
1211 | - | if (isDefined(getInteger(finishKey))) | |
1212 | - | then throw("You already commited for random, please use it") | |
1213 | - | else { | |
1214 | - | let finishBlock = (height + RANDOM_DELAY) | |
1215 | - | $Tuple2(([IntegerEntry(finishKey, finishBlock)] ++ prologActions), finishBlock) | |
1216 | - | } | |
1217 | - | } | |
1173 | + | func openNftChest () = if ((i.caller != this)) | |
1174 | + | then throw("Temporary disabled") | |
1175 | + | else { | |
1176 | + | let prologActions = prolog(i) | |
1177 | + | if ((size(i.payments) != 1)) | |
1178 | + | then throw("exactly 1 payment must be attached") | |
1179 | + | else { | |
1180 | + | let pmt = i.payments[0] | |
1181 | + | let wlgAmount = pmt.amount | |
1182 | + | if (if (!(isDefined(pmt.assetId))) | |
1183 | + | then true | |
1184 | + | else (value(pmt.assetId) != wlgAssetId)) | |
1185 | + | then throw("WLGOLD payments only!") | |
1186 | + | else { | |
1187 | + | let minWlgFee = fraction(NFT_CHEST_PRICE_USDT, MULT8, getWlgPrice(0)) | |
1188 | + | let change = (wlgAmount - minWlgFee) | |
1189 | + | let forTeam = (minWlgFee / 2) | |
1190 | + | let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [(minWlgFee - forTeam)], nil)) | |
1191 | + | if ((0 > change)) | |
1192 | + | then throw((("You need to attach " + fixedPoint(minWlgFee, 8)) + " WLGOLD as fee")) | |
1193 | + | else { | |
1194 | + | let changeActions = if ((change > 0)) | |
1195 | + | then [ScriptTransfer(i.caller, change, wlgAssetId)] | |
1196 | + | else nil | |
1197 | + | let addr = toString(i.caller) | |
1198 | + | let finishKey = keyCommit(addr) | |
1199 | + | let finishBlock = valueOrErrorMessage(getInteger(finishKey), "You have to commitForRandom() first!") | |
1200 | + | if ((finishBlock > height)) | |
1201 | + | then throw(("Random number is not ready yet, wait until height = " + toString(finishBlock))) | |
1202 | + | else { | |
1203 | + | let entropy = value(value(blockInfoByHeight(finishBlock)).vrf) | |
1204 | + | let salt = fromBase58String(split(valueOrElse(getString(keyCurWeekTxIdByUser(addr)), "42_DEFAULT"), "_")[1]) | |
1205 | + | let rand = getRandomNumber(100, salt, entropy) | |
1206 | + | let $t03327633548 = if ((84 > rand)) | |
1207 | + | then $Tuple2(1, idxRarityC) | |
1208 | + | else if ((98 > rand)) | |
1209 | + | then $Tuple2(5, idxRarityU) | |
1210 | + | else $Tuple2(10, idxRarityL) | |
1211 | + | let bonus = $t03327633548._1 | |
1212 | + | let rarityIdx = $t03327633548._2 | |
1213 | + | let $t03355133701 = issueNftCustom(idxNamePickaxe, rarityIdx, idxCollDig, rarityIdx, bonus, idxDescrPickaxe, idxBonusTypeFp, i.caller) | |
1214 | + | let issueNftActions = $t03355133701._1 | |
1215 | + | let nftAssetId = $t03355133701._2 | |
1216 | + | $Tuple2(((((issueNftActions ++ prologActions) ++ changeActions) :+ ScriptTransfer(addressFromStringValue(getStringValue(wlgContract, teamAddrKey)), forTeam, wlgAssetId)) :+ DeleteEntry(finishKey)), $Tuple2(nftAssetId, wlgRemain)) | |
1217 | + | } | |
1218 | + | } | |
1219 | + | } | |
1220 | + | } | |
1221 | + | } | |
1222 | + | ||
1223 | + | ||
1224 | + | ||
1225 | + | @Callable(i) | |
1226 | + | func commitForRandom () = if ((i.caller != this)) | |
1227 | + | then throw("Temporary disabled") | |
1228 | + | else { | |
1229 | + | let prologActions = prolog(i) | |
1230 | + | let addr = toString(i.caller) | |
1231 | + | let finishKey = keyCommit(addr) | |
1232 | + | if (isDefined(getInteger(finishKey))) | |
1233 | + | then throw("You already commited for random, please use it") | |
1234 | + | else { | |
1235 | + | let finishBlock = (height + RANDOM_DELAY) | |
1236 | + | $Tuple2(([IntegerEntry(finishKey, finishBlock)] ++ prologActions), finishBlock) | |
1237 | + | } | |
1238 | + | } | |
1218 | 1239 | ||
1219 | 1240 | ||
1220 | 1241 | ||
1277 | 1298 | let newMap = if ((mapParts[0] == "")) | |
1278 | 1299 | then drop(mapParts[1], 5) | |
1279 | 1300 | else (dropRight(mapParts[0], 1) + drop(mapParts[1], 4)) | |
1280 | - | let stakeActions = invoke(this, "stakeAcresFor", [winner, promoAwardPerRound[j], true], nil) | |
1281 | - | if ((stakeActions == stakeActions)) | |
1301 | + | let winActions = if ((j == 0)) | |
1302 | + | then invoke(this, "issueMittenP", [winner], nil) | |
1303 | + | else invoke(this, "stakeAcresFor", [winner, promoAwardPerRound[j], true], nil) | |
1304 | + | if ((winActions == winActions)) | |
1282 | 1305 | then { | |
1283 | 1306 | let newSalt = fromBase58String(split(valueOrElse(getString(keyCurWeekTxIdByUser(winner)), "0_DEFAULT"), "_")[1]) | |
1284 | 1307 | $Tuple4((ac._1 - r._2), newSalt, newMap, (ac._4 :+ winner)) | |
1288 | 1311 | } | |
1289 | 1312 | ||
1290 | 1313 | let draws = { | |
1291 | - | let $l = [0, 1, 2] | |
1314 | + | let $l = [0, 1, 2, 3, 4, 5] | |
1292 | 1315 | let $s = size($l) | |
1293 | 1316 | let $acc0 = $Tuple4(maxValue, i.transactionId, promoMap, nil) | |
1294 | 1317 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1297 | 1320 | ||
1298 | 1321 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1299 | 1322 | then $a | |
1300 | - | else throw("List size exceeds | |
1323 | + | else throw("List size exceeds 6") | |
1301 | 1324 | ||
1302 | - | $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3) | |
1325 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
1303 | 1326 | } | |
1304 | 1327 | $Tuple2([StringEntry(keyPromoMap, draws._3), IntegerEntry(keyTotalPromoTickets, draws._1), StringEntry(keyDailyWinners(today), makeString(draws._4, "_"))], 0) | |
1305 | 1328 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let MULT6 = 1000000 | |
7 | 7 | ||
8 | 8 | let MULT7 = 10000000 | |
9 | 9 | ||
10 | 10 | let MULT8 = 100000000 | |
11 | 11 | ||
12 | 12 | let MULT14 = 100000000000000 | |
13 | 13 | ||
14 | 14 | let DAY_MILLIS = 86400000 | |
15 | 15 | ||
16 | 16 | let USDT2ACRES_MULTIPLIER = 10 | |
17 | 17 | ||
18 | 18 | let ONE_PERCENT_DIVISOR = 100 | |
19 | 19 | ||
20 | 20 | let RANDOM_DELAY = 2 | |
21 | 21 | ||
22 | 22 | let NFT_CHEST_PRICE_USDT = 5000000 | |
23 | 23 | ||
24 | 24 | let chain = take(drop(this.bytes, 1), 1) | |
25 | 25 | ||
26 | 26 | let DAILY_PROMO_START_BLOCK = match chain { | |
27 | 27 | case _ => | |
28 | 28 | if ((base58'2W' == $match0)) | |
29 | 29 | then 4487040 | |
30 | 30 | else if ((base58'2T' == $match0)) | |
31 | 31 | then 3412800 | |
32 | 32 | else throw("Unknown chain") | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | let DAILY_PROMO_END_BLOCK = match chain { | |
36 | 36 | case _ => | |
37 | 37 | if ((base58'2W' == $match0)) | |
38 | 38 | then 4517280 | |
39 | 39 | else if ((base58'2T' == $match0)) | |
40 | 40 | then 3443040 | |
41 | 41 | else throw("Unknown chain") | |
42 | 42 | } | |
43 | 43 | ||
44 | 44 | let DAY_BLOCKS = match chain { | |
45 | 45 | case _ => | |
46 | 46 | if ((base58'2W' == $match0)) | |
47 | 47 | then 1440 | |
48 | 48 | else if ((base58'2T' == $match0)) | |
49 | 49 | then 60 | |
50 | 50 | else throw("Unknown chain") | |
51 | 51 | } | |
52 | 52 | ||
53 | 53 | let WEEK_BLOCKS = match chain { | |
54 | 54 | case _ => | |
55 | 55 | if ((base58'2W' == $match0)) | |
56 | 56 | then 10080 | |
57 | 57 | else if ((base58'2T' == $match0)) | |
58 | 58 | then 180 | |
59 | 59 | else throw("Unknown chain") | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | let VRF_OFFSET = match chain { | |
63 | 63 | case _ => | |
64 | 64 | if ((base58'2W' == $match0)) | |
65 | 65 | then 0 | |
66 | 66 | else if ((base58'2T' == $match0)) | |
67 | 67 | then 1146000 | |
68 | 68 | else throw("Unknown chain") | |
69 | 69 | } | |
70 | 70 | ||
71 | 71 | let usdtAssetId = match chain { | |
72 | 72 | case _ => | |
73 | 73 | if ((base58'2W' == $match0)) | |
74 | 74 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
75 | 75 | else if ((base58'2T' == $match0)) | |
76 | 76 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
77 | 77 | else throw("Unknown chain") | |
78 | 78 | } | |
79 | 79 | ||
80 | 80 | let defaultRest2AddressStr = match chain { | |
81 | 81 | case _ => | |
82 | 82 | if ((base58'2W' == $match0)) | |
83 | 83 | then "3PFwYta8biEz31zpeFe5DJK8wE5trSpQVF8" | |
84 | 84 | else if ((base58'2T' == $match0)) | |
85 | 85 | then "3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv" | |
86 | 86 | else throw("Unknown chain") | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | let arbitrageDelay = match chain { | |
90 | 90 | case _ => | |
91 | 91 | if ((base58'2W' == $match0)) | |
92 | 92 | then DAY_MILLIS | |
93 | 93 | else if ((base58'2T' == $match0)) | |
94 | 94 | then 60000 | |
95 | 95 | else throw("Unknown chain") | |
96 | 96 | } | |
97 | 97 | ||
98 | 98 | let oldStakingContractStr = match chain { | |
99 | 99 | case _ => | |
100 | 100 | if ((base58'2W' == $match0)) | |
101 | 101 | then "3PLncXtS1U83D6cQbFD3H8rBHPLgzxSFKZ1" | |
102 | 102 | else if ((base58'2T' == $match0)) | |
103 | 103 | then "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm" | |
104 | 104 | else throw("Unknown chain") | |
105 | 105 | } | |
106 | 106 | ||
107 | 107 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | let IdxCfgAcres2Dapp = 1 | |
111 | 111 | ||
112 | 112 | let IdxCfgWlgDapp = 2 | |
113 | 113 | ||
114 | 114 | let IdxCfgInvestFundDapp = 5 | |
115 | 115 | ||
116 | 116 | let IdxCfgMarketDapp = 6 | |
117 | 117 | ||
118 | 118 | func keyRestCfg () = "%s__restConfig" | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func keyRest2Address () = "%s__rest2Addr" | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func getContractAddressOrFail (rest2Cfg,idx) = valueOrErrorMessage(addressFromString(rest2Cfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | let rest2Contract = addressFromStringValue(valueOrElse(getString(this, keyRest2Address()), defaultRest2AddressStr)) | |
131 | 131 | ||
132 | 132 | let rest2Cfg = readRestCfgOrFail(rest2Contract) | |
133 | 133 | ||
134 | 134 | let acres2Contract = getContractAddressOrFail(rest2Cfg, IdxCfgAcres2Dapp) | |
135 | 135 | ||
136 | 136 | let wlgContract = getContractAddressOrFail(rest2Cfg, IdxCfgWlgDapp) | |
137 | 137 | ||
138 | 138 | let investFundContract = getContractAddressOrFail(rest2Cfg, IdxCfgInvestFundDapp) | |
139 | 139 | ||
140 | 140 | let marketContract = getContractAddressOrFail(rest2Cfg, IdxCfgMarketDapp) | |
141 | 141 | ||
142 | 142 | let oldAcresContractKey = "oldAcresContract" | |
143 | 143 | ||
144 | 144 | func keyBlocked () = "contractsBlocked" | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func keyLastWeekTxIdByUser (addr) = ("lastWeekTxIdByUser_" + addr) | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func keyCurWeekTxIdByUser (addr) = ("curWeekTxIdByUser_" + addr) | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func keyCommit (address) = ("finishBlockFor_" + address) | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | let wlgAssetIdKey = "wlg_assetId" | |
157 | 157 | ||
158 | 158 | let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), "WLGOLD is not issued yet") | |
159 | 159 | ||
160 | 160 | let acresIssuedAmountKey = "acresIssuedAmount" | |
161 | 161 | ||
162 | 162 | let acresAssetIdKey = "acresAssetId" | |
163 | 163 | ||
164 | 164 | let acresAssetId = valueOrErrorMessage(getBinary(acres2Contract, acresAssetIdKey), "ACRES is not issued yet") | |
165 | 165 | ||
166 | 166 | func keyAcresStakedTimeByUser (addr) = ("acresStakedTimeByUser_" + addr) | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | func keyStakedLandsByOwner (ownerAddr) = ("stakedLandsByOwner_" + ownerAddr) | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func keyStakedTimeByAssetIdAndOwner (assetId,addr) = ((("st_" + assetId) + "_") + addr) | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func keyStakedNFTsByOwner (ownerAddr) = ("stakedNFTsByOwner_" + ownerAddr) | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func keyUserPromoAcres (address) = ("promoAcres_" + address) | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | func keyUserPromoTickets (address) = ("promoTickets_" + address) | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | let keyTotalPromoTickets = "totalPromoTickets" | |
188 | 188 | ||
189 | 189 | let keyPromoMap = "promoMap" | |
190 | 190 | ||
191 | 191 | func keyDailyWinners (day) = ("dailyWinners_" + toString(day)) | |
192 | 192 | ||
193 | 193 | ||
194 | + | let promoNumPrizes = 6 | |
195 | + | ||
196 | + | let promoAwardPerRound = [0, 500000000, 100000000, 100000000, 100000000, 100000000] | |
197 | + | ||
194 | 198 | func asInt (v) = match v { | |
195 | 199 | case n: Int => | |
196 | 200 | n | |
197 | 201 | case _ => | |
198 | 202 | throw("fail to cast into Int") | |
199 | 203 | } | |
200 | 204 | ||
201 | 205 | ||
202 | 206 | func asTuple5Ints (val) = match val { | |
203 | 207 | case t: (Int, Int, Int, Int, Int) => | |
204 | 208 | t | |
205 | 209 | case _ => | |
206 | 210 | throw("fail to cast into (Int, Int, Int, Int, Int)") | |
207 | 211 | } | |
208 | 212 | ||
209 | 213 | ||
210 | 214 | func asTuple4Ints (val) = match val { | |
211 | 215 | case t: (Int, Int, Int, Int) => | |
212 | 216 | t | |
213 | 217 | case _ => | |
214 | 218 | throw("fail to cast into (Int, Int, Int, Int)") | |
215 | 219 | } | |
216 | 220 | ||
217 | 221 | ||
218 | 222 | func asTuple3Ints (val) = match val { | |
219 | 223 | case t: (Int, Int, Int) => | |
220 | 224 | t | |
221 | 225 | case _ => | |
222 | 226 | throw("fail to cast into (Int, Int, Int)") | |
223 | 227 | } | |
224 | 228 | ||
225 | 229 | ||
226 | 230 | func asTuple2Ints (val) = match val { | |
227 | 231 | case t: (Int, Int) => | |
228 | 232 | t | |
229 | 233 | case _ => | |
230 | 234 | throw("fail to cast into (Int, Int)") | |
231 | 235 | } | |
232 | 236 | ||
233 | 237 | ||
234 | 238 | func fixedPoint (val,decimals) = { | |
235 | 239 | let tenPow = pow(10, 0, decimals, 0, 0, DOWN) | |
236 | 240 | let lowPart = toString((val % tenPow)) | |
237 | 241 | let zeroes = drop(toString(tenPow), (1 + size(lowPart))) | |
238 | 242 | (((toString((val / tenPow)) + ".") + zeroes) + lowPart) | |
239 | 243 | } | |
240 | 244 | ||
241 | 245 | ||
242 | 246 | func getRandomNumber (maxValue,salt,entropy) = if ((0 >= maxValue)) | |
243 | 247 | then throw("maxValue should be > 0") | |
244 | 248 | else { | |
245 | 249 | let randomHash = sha256_16Kb((salt + entropy)) | |
246 | 250 | (toInt(randomHash) % maxValue) | |
247 | 251 | } | |
248 | 252 | ||
249 | 253 | ||
250 | 254 | func padL (val,len) = { | |
251 | 255 | let valS = toString(val) | |
252 | 256 | let zeroes = drop(toString(pow(10, 0, (len - size(valS)), 0, 0, DOWN)), 1) | |
253 | 257 | (zeroes + valS) | |
254 | 258 | } | |
255 | 259 | ||
256 | 260 | ||
257 | 261 | let M6_ = 1000000 | |
258 | 262 | ||
259 | 263 | let M8_ = 100000000 | |
260 | 264 | ||
261 | 265 | let wlgIssuedAmtKey = "wlg_issuedAmount" | |
262 | 266 | ||
263 | 267 | let zbIssuedAmtKey = "zbill_issuedAmount" | |
264 | 268 | ||
265 | 269 | func keyAcresStakedAmtByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
266 | 270 | ||
267 | 271 | ||
268 | 272 | func keyFarmingPowerByUser (addr) = ("farmingPowerByUser_" + addr) | |
269 | 273 | ||
270 | 274 | ||
271 | 275 | let acresStakdTotalKey = "acresStakedAmountTotal" | |
272 | 276 | ||
273 | 277 | let totalFarmingPowerKey = "totalFarmingPower" | |
274 | 278 | ||
275 | 279 | let MAX_WL_NFTS = 3 | |
276 | 280 | ||
277 | 281 | let MAX_ARK_NFTS = 1 | |
278 | 282 | ||
279 | 283 | let ARK_NFT_BONUS = 5000 | |
280 | 284 | ||
281 | 285 | let MAX_NFTS_STAKED_BY_USER = 4 | |
282 | 286 | ||
283 | 287 | let keyNftTotalIssued = "nftTotalIssued" | |
284 | 288 | ||
285 | 289 | let keyNftTotalBurned = "nftTotalBurned" | |
286 | 290 | ||
287 | 291 | let keyWlNftTotalStaked = "WlNftTotalStaked" | |
288 | 292 | ||
289 | 293 | let keyArkNftTotalStaked = "ArkNftTotalStaked" | |
290 | 294 | ||
291 | 295 | func keyNftNumberByAssetId (assetId) = ("nftNumberByAssetId_" + assetId) | |
292 | 296 | ||
293 | 297 | ||
294 | 298 | func keyUserWlNftNumber (addr) = ("userWlNftNumber_" + addr) | |
295 | 299 | ||
296 | 300 | ||
297 | 301 | func keyUserArkNftNumber (addr) = ("userArkNftNumber_" + addr) | |
298 | 302 | ||
299 | 303 | ||
300 | 304 | func keyUserFullBonus (addr) = ("userFullBonus_" + addr) | |
301 | 305 | ||
302 | 306 | ||
303 | 307 | let levelAcres = [0, 10, 20, 40, 80, 150, 250, 400, 700, 1000] | |
304 | 308 | ||
305 | 309 | func getLevelByAcres (acres) = { | |
306 | 310 | let acr = ((acres + 99999999) / M8_) | |
307 | 311 | func checker (acc,item) = if ((item >= acr)) | |
308 | 312 | then acc | |
309 | 313 | else (acc + 1) | |
310 | 314 | ||
311 | 315 | let $l = levelAcres | |
312 | 316 | let $s = size($l) | |
313 | 317 | let $acc0 = 0 | |
314 | 318 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
315 | 319 | then $a | |
316 | 320 | else checker($a, $l[$i]) | |
317 | 321 | ||
318 | 322 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
319 | 323 | then $a | |
320 | 324 | else throw("List size exceeds 10") | |
321 | 325 | ||
322 | 326 | $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) | |
323 | 327 | } | |
324 | 328 | ||
325 | 329 | ||
326 | 330 | func getFarmingPowerByAcres (acres) = ((acres * 20) * (getLevelByAcres(acres) + 4)) | |
327 | 331 | ||
328 | 332 | ||
329 | 333 | func getFarmingPowerByAcresAndBonus (acres,bonus6) = { | |
330 | 334 | let notBonused = getFarmingPowerByAcres(acres) | |
331 | 335 | $Tuple2(fraction(notBonused, (M6_ + bonus6), M6_), notBonused) | |
332 | 336 | } | |
333 | 337 | ||
334 | 338 | ||
335 | 339 | let teamAddrKey = "teamAddr" | |
336 | 340 | ||
337 | 341 | func keyLastWlgTradeTimeByUser (addr) = ("lastArbTimeUser_" + addr) | |
338 | 342 | ||
339 | 343 | ||
340 | 344 | let OLD_STAKING_DEADL = 1733346000000 | |
341 | 345 | ||
342 | 346 | let MAX_LANDS_TO_CONVERT = 14 | |
343 | 347 | ||
344 | 348 | let keyLastAcresSellTime = "lastAcresSellTime" | |
345 | 349 | ||
346 | 350 | let keyLastLimitLeft = "lastLimitLeft" | |
347 | 351 | ||
348 | 352 | let names = ["Gold shovel", "Pickaxe"] | |
349 | 353 | ||
350 | - | let descriptions = ["Reward for early birds", "Increases FarmPower"] | |
354 | + | let descriptions = ["Reward for early birds", "Increases FarmPower", "New Year promo reward"] | |
351 | 355 | ||
352 | 356 | let idxDescrShovel = 0 | |
353 | 357 | ||
354 | 358 | let idxDescrPickaxe = 1 | |
359 | + | ||
360 | + | let idxDescrMitten = 2 | |
355 | 361 | ||
356 | 362 | let rarityThresholds = [5, 10, 20] | |
357 | 363 | ||
358 | 364 | let idxThresholdC = 0 | |
359 | 365 | ||
360 | 366 | let idxThresholdU = 1 | |
361 | 367 | ||
362 | 368 | let idxThresholdL = 2 | |
363 | 369 | ||
364 | - | let namez = ["SHOVEL", "PICKAXE"] | |
370 | + | let namez = ["SHOVEL", "PICKAXE", "MITTEN"] | |
365 | 371 | ||
366 | 372 | let idxNameShovel = 0 | |
367 | 373 | ||
368 | 374 | let idxNamePickaxe = 1 | |
369 | 375 | ||
370 | - | let contentKeyz = ["contentPickaxeC", "contentPickaxeU", "contentPickaxeL", "contentPickaxeE", "contentShovelP"] | |
376 | + | let idxNameMitten = 2 | |
377 | + | ||
378 | + | let contentKeyz = ["contentPickaxeC", "contentPickaxeU", "contentPickaxeL", "contentPickaxeE", "contentShovelP", "contentMittenP"] | |
371 | 379 | ||
372 | 380 | let idxKeyC = 0 | |
373 | 381 | ||
374 | - | let idxKeyP = 4 | |
382 | + | let idxKeySP = 4 | |
383 | + | ||
384 | + | let idxKeyMP = 5 | |
375 | 385 | ||
376 | 386 | let rarityNames = ["Common", "Uncommon", "Legendary", "Epic", "Promo"] | |
377 | 387 | ||
378 | 388 | let idxRarityC = 0 | |
379 | 389 | ||
380 | 390 | let idxRarityU = 1 | |
381 | 391 | ||
382 | 392 | let idxRarityL = 2 | |
383 | 393 | ||
384 | 394 | let idxRarityE = 3 | |
385 | 395 | ||
386 | 396 | let idxRarityP = 4 | |
387 | 397 | ||
388 | - | let collectionz = ["Digging tools"] | |
398 | + | let collectionz = ["Digging tools", "New Year gifts"] | |
389 | 399 | ||
390 | 400 | let idxCollDig = 0 | |
401 | + | ||
402 | + | let idxCollNNewYear = 1 | |
391 | 403 | ||
392 | 404 | let bonusTypez = ["FarmPower"] | |
393 | 405 | ||
394 | 406 | let idxBonusTypeFp = 0 | |
395 | 407 | ||
396 | 408 | func prolog (i) = if (if ((i.originCaller != rest2Contract)) | |
397 | 409 | then valueOrElse(getBoolean(keyBlocked()), false) | |
398 | 410 | else false) | |
399 | 411 | then throw("Contracts are under maintenance") | |
400 | 412 | else { | |
401 | 413 | let addr = toString(i.originCaller) | |
402 | 414 | let week = (height / WEEK_BLOCKS) | |
403 | 415 | let lastWeekKey = keyLastWeekTxIdByUser(addr) | |
404 | 416 | let lastWeekTxIdByUser = getString(lastWeekKey) | |
405 | 417 | let txId = toBase58String(i.transactionId) | |
406 | 418 | let wtx = ((toString(week) + "_") + txId) | |
407 | 419 | let curWeekKey = keyCurWeekTxIdByUser(addr) | |
408 | 420 | if (isDefined(lastWeekTxIdByUser)) | |
409 | 421 | then { | |
410 | 422 | let lastWeekTx = split(value(lastWeekTxIdByUser), "_") | |
411 | 423 | if ((lastWeekTx[0] == toString(week))) | |
412 | 424 | then [StringEntry(lastWeekKey, wtx), StringEntry(curWeekKey, wtx)] | |
413 | 425 | else if ((lastWeekTx[0] == toString((week - 1)))) | |
414 | 426 | then [StringEntry(curWeekKey, wtx)] | |
415 | 427 | else { | |
416 | 428 | let curWeekTxIdByUser = getStringValue(curWeekKey) | |
417 | 429 | let curWeekTx = split(curWeekTxIdByUser, "_") | |
418 | 430 | if ((curWeekTx[0] == toString(week))) | |
419 | 431 | then [StringEntry(curWeekKey, wtx)] | |
420 | 432 | else [StringEntry(lastWeekKey, curWeekTxIdByUser), StringEntry(curWeekKey, wtx)] | |
421 | 433 | } | |
422 | 434 | } | |
423 | 435 | else [StringEntry(lastWeekKey, wtx), StringEntry(curWeekKey, wtx)] | |
424 | 436 | } | |
425 | 437 | ||
426 | 438 | ||
427 | 439 | func createNftDescrCustom (contKey,nftSerial,collection,name,descr,rarity,bonus,bonusType) = (((((((((((((((((((((((("{\"url\": \"https://waveslands.com\", " + "\"contentKey\": \"") + contKey) + "\", ") + "\"number\": ") + toString(nftSerial)) + ", ") + "\"collection\": \"") + collection) + "\", ") + "\"name\": \"") + name) + "\", ") + "\"description\": \"") + descr) + "\", ") + "\"rare\": \"") + rarity) + "\", ") + "\"bonus\": ") + toString(bonus)) + ", ") + "\"bonusType\": \"") + bonusType) + "\"}") | |
428 | 440 | ||
429 | 441 | ||
430 | 442 | func issueNftCustom (nameIdx,contKeyIdx,collIdx,rarityIdx,bonusPerc,descrIdx,bonusTypeIdx,addr) = { | |
431 | 443 | let nftSerial = valueOrElse(getInteger(keyNftTotalIssued), 0) | |
432 | 444 | let rarity = rarityNames[rarityIdx] | |
433 | 445 | let name = (((namez[nameIdx] + "-") + take(rarity, 1)) + toString(bonusPerc)) | |
434 | 446 | let issue = Issue(name, createNftDescrCustom(contentKeyz[contKeyIdx], nftSerial, collectionz[collIdx], names[nameIdx], descriptions[descrIdx], rarityNames[rarityIdx], bonusPerc, bonusTypez[bonusTypeIdx]), 1, 0, false) | |
435 | 447 | let nftAssetId = calculateAssetId(issue) | |
436 | 448 | $Tuple2([issue, IntegerEntry(keyNftTotalIssued, (nftSerial + 1)), IntegerEntry(keyNftNumberByAssetId(toBase58String(nftAssetId)), nftSerial), ScriptTransfer(addr, 1, nftAssetId)], nftAssetId) | |
437 | 449 | } | |
438 | 450 | ||
439 | 451 | ||
440 | 452 | func bonusByDescription (descr) = if (!(contains(descr, "\"bonusType\": \"FarmPower\""))) | |
441 | 453 | then throw(("NFT is not supported: " + descr)) | |
442 | 454 | else { | |
443 | 455 | let bonusStr = split_4C(split_4C(descr, "\"bonus\":")[1], ",")[0] | |
444 | 456 | parseIntValue(drop(bonusStr, (valueOrElse(lastIndexOf(bonusStr, " "), -1) + 1))) | |
445 | 457 | } | |
446 | 458 | ||
447 | 459 | ||
448 | 460 | func rarityIdxByDescriprion (descr) = if (!(contains(descr, "\"rare\""))) | |
449 | 461 | then throw(("NFT is not supported: " + descr)) | |
450 | 462 | else { | |
451 | 463 | let rarityStr = split_4C(split_4C(split_4C(descr, "\"rare\"")[1], ",")[0], "\"")[1] | |
452 | 464 | value(indexOf(rarityNames, rarityStr)) | |
453 | 465 | } | |
454 | 466 | ||
455 | 467 | ||
456 | 468 | func stakeUnstakeAcresInternal (amt,address,bonusDelta) = if (if ((amt == 0)) | |
457 | 469 | then (bonusDelta == 0) | |
458 | 470 | else false) | |
459 | 471 | then throw("Nothing to do") | |
460 | 472 | else { | |
461 | 473 | let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil) | |
462 | 474 | if ((wlgResult == wlgResult)) | |
463 | 475 | then { | |
464 | 476 | let now = lastBlock.timestamp | |
465 | 477 | let timeKey = keyAcresStakedTimeByUser(address) | |
466 | 478 | let amountKey = keyAcresStakedAmtByUser(address) | |
467 | 479 | let oldAcresAmount = valueOrElse(getInteger(amountKey), 0) | |
468 | 480 | if (if ((0 > amt)) | |
469 | 481 | then (0 > (oldAcresAmount + amt)) | |
470 | 482 | else false) | |
471 | 483 | then throw(((("You have only " + fixedPoint(oldAcresAmount, 8)) + " ACRES staked, tried to unstake ") + fixedPoint(-(amt), 8))) | |
472 | 484 | else { | |
473 | 485 | let newAcresAmount = (oldAcresAmount + amt) | |
474 | 486 | let oldTotal = valueOrElse(getInteger(acresStakdTotalKey), 0) | |
475 | 487 | let userFpKey = keyFarmingPowerByUser(address) | |
476 | 488 | let oldFp = valueOrElse(getInteger(userFpKey), 0) | |
477 | 489 | let bonusKey = keyUserFullBonus(address) | |
478 | 490 | let oldBonus = valueOrElse(getInteger(acres2Contract, bonusKey), 0) | |
479 | 491 | if (if ((0 > bonusDelta)) | |
480 | 492 | then (0 > (oldBonus + bonusDelta)) | |
481 | 493 | else false) | |
482 | 494 | then throw((((("You have only " + fixedPoint(oldBonus, 4)) + "% bonus, and tried to unstake ") + fixedPoint(-(bonusDelta), 4)) + "%")) | |
483 | 495 | else { | |
484 | - | let $ | |
485 | - | let newBonusedFp = $ | |
486 | - | let ignored = $ | |
496 | + | let $t064656564 = getFarmingPowerByAcresAndBonus(newAcresAmount, (oldBonus + bonusDelta)) | |
497 | + | let newBonusedFp = $t064656564._1 | |
498 | + | let ignored = $t064656564._2 | |
487 | 499 | let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0) | |
488 | 500 | let acresActions = if ((amt == 0)) | |
489 | 501 | then nil | |
490 | 502 | else [IntegerEntry(amountKey, newAcresAmount), IntegerEntry(acresStakdTotalKey, (oldTotal + amt))] | |
491 | 503 | let bonusActions = if ((bonusDelta == 0)) | |
492 | 504 | then nil | |
493 | 505 | else [IntegerEntry(bonusKey, (oldBonus + bonusDelta))] | |
494 | 506 | $Tuple2(((((acresActions ++ bonusActions) :+ IntegerEntry(timeKey, lastBlock.timestamp)) :+ IntegerEntry(userFpKey, newBonusedFp)) :+ IntegerEntry(totalFarmingPowerKey, ((oldTotalFp + newBonusedFp) - oldFp))), wlgResult) | |
495 | 507 | } | |
496 | 508 | } | |
497 | 509 | } | |
498 | 510 | else throw("Strict value is not equal to itself.") | |
499 | 511 | } | |
500 | 512 | ||
501 | 513 | ||
502 | 514 | func getWlgPrice (usdtBalanceCorrection) = { | |
503 | 515 | let issuedAmount = valueOrErrorMessage(getInteger(wlgContract, wlgIssuedAmtKey), "WLGOLD is not issued yet") | |
504 | 516 | let wlgUsd = assetBalance(wlgContract, usdtAssetId) | |
505 | 517 | let acres2Usd = (assetBalance(acres2Contract, usdtAssetId) - usdtBalanceCorrection) | |
506 | 518 | let investFundTotal = (assetBalance(investFundContract, usdtAssetId) + valueOrElse(getInteger(investFundContract, zbIssuedAmtKey), 0)) | |
507 | 519 | let totalFundsUsd = ((acres2Usd + wlgUsd) + investFundTotal) | |
508 | 520 | fraction(totalFundsUsd, MULT8, issuedAmount) | |
509 | 521 | } | |
510 | 522 | ||
511 | 523 | ||
512 | 524 | func getSwapLimitAcres () = { | |
513 | 525 | let wlgUsd = assetBalance(wlgContract, usdtAssetId) | |
514 | 526 | let acres2Usd = assetBalance(this, usdtAssetId) | |
515 | 527 | let investFundTotal = (assetBalance(investFundContract, usdtAssetId) + valueOrElse(getInteger(investFundContract, zbIssuedAmtKey), 0)) | |
516 | 528 | let defaultLimit = (((acres2Usd + wlgUsd) + investFundTotal) / ONE_PERCENT_DIVISOR) | |
517 | 529 | let lastLimitLeft = valueOrElse(getInteger(keyLastLimitLeft), defaultLimit) | |
518 | 530 | let lastTime = valueOrElse(getInteger(keyLastAcresSellTime), 0) | |
519 | 531 | let now = lastBlock.timestamp | |
520 | 532 | let currentLimit = (lastLimitLeft + fraction(defaultLimit, (now - lastTime), DAY_MILLIS)) | |
521 | 533 | let limitLeftUsdt = min([currentLimit, defaultLimit]) | |
522 | 534 | $Tuple2(IntegerEntry(keyLastAcresSellTime, now), limitLeftUsdt) | |
523 | 535 | } | |
524 | 536 | ||
525 | 537 | ||
526 | 538 | let arkOracle = addressFromStringValue("3PJgZ6AK1WVCpdCmEZpesHmaKvrQDdXG5og") | |
527 | 539 | ||
528 | 540 | let incubator = valueOrElse(getString(arkOracle, "static_incubatorAddress"), "") | |
529 | 541 | ||
530 | 542 | let breeder = valueOrElse(getString(arkOracle, "static_breederAddress"), "") | |
531 | 543 | ||
532 | 544 | let turtleIncubator = valueOrElse(getString(arkOracle, "static_turtleIncubatorAddress"), "") | |
533 | 545 | ||
534 | 546 | let turtleBreeder = valueOrElse(getString(arkOracle, "static_turtleBreederAddress"), "") | |
535 | 547 | ||
536 | 548 | let canineIncubator = valueOrElse(getString(arkOracle, "static_canineIncubatorAddress"), "") | |
537 | 549 | ||
538 | 550 | let canineBreeder = valueOrElse(getString(arkOracle, "static_canineBreederAddress"), "") | |
539 | 551 | ||
540 | 552 | let felineIncubator = valueOrElse(getString(arkOracle, "static_felineIncubatorAddress"), "") | |
541 | 553 | ||
542 | 554 | let felineBreeder = valueOrElse(getString(arkOracle, "static_felineBreederAddress"), "") | |
543 | 555 | ||
544 | 556 | let mutantBreeder = valueOrElse(getString(arkOracle, "static_mutantIncubatorAddress"), "") | |
545 | 557 | ||
546 | 558 | func isArkimalIssued (nfo) = { | |
547 | 559 | let issuer = toString(nfo.issuer) | |
548 | 560 | if (if (if (if (if (if (if (if (if (if ((chain == base58'2T')) | |
549 | 561 | then (issuer == oldStakingContractStr) | |
550 | 562 | else false) | |
551 | 563 | then true | |
552 | 564 | else (issuer == incubator)) | |
553 | 565 | then true | |
554 | 566 | else (issuer == breeder)) | |
555 | 567 | then true | |
556 | 568 | else (issuer == turtleIncubator)) | |
557 | 569 | then true | |
558 | 570 | else (issuer == turtleBreeder)) | |
559 | 571 | then true | |
560 | 572 | else (issuer == canineIncubator)) | |
561 | 573 | then true | |
562 | 574 | else (issuer == canineBreeder)) | |
563 | 575 | then true | |
564 | 576 | else (issuer == felineIncubator)) | |
565 | 577 | then true | |
566 | 578 | else (issuer == felineBreeder)) | |
567 | 579 | then nfo.name | |
568 | 580 | else if ((issuer == mutantBreeder)) | |
569 | 581 | then nfo.description | |
570 | 582 | else "" | |
571 | 583 | } | |
572 | 584 | ||
573 | 585 | ||
574 | 586 | func stakeNftInternal (addr,assetIdStr,bonus6,userNumKey,totalNumKey,limit) = { | |
575 | 587 | let nftNumber = valueOrElse(getInteger(userNumKey), 0) | |
576 | 588 | if ((nftNumber >= limit)) | |
577 | 589 | then throw((("You can stake max " + toString(limit)) + " of such NFTs")) | |
578 | 590 | else { | |
579 | - | let $ | |
580 | - | let actions = $ | |
581 | - | let wlgClaimedAmount = $ | |
591 | + | let $t01084310919 = stakeUnstakeAcresInternal(0, addr, bonus6) | |
592 | + | let actions = $t01084310919._1 | |
593 | + | let wlgClaimedAmount = $t01084310919._2 | |
582 | 594 | $Tuple2((((actions :+ IntegerEntry(userNumKey, (nftNumber + 1))) :+ IntegerEntry(totalNumKey, (valueOrElse(getInteger(totalNumKey), 0) + 1))) :+ IntegerEntry(keyStakedTimeByAssetIdAndOwner(assetIdStr, addr), lastBlock.timestamp)), wlgClaimedAmount) | |
583 | 595 | } | |
584 | 596 | } | |
585 | 597 | ||
586 | 598 | ||
587 | - | let promoNumPrizes = 3 | |
588 | - | ||
589 | - | let promoAwardPerRound = [50000000, 25000000, 25000000] | |
590 | - | ||
591 | 599 | func stakeAcresForInternal (address,amt,shouldCleanPromo) = { | |
592 | - | let $ | |
593 | - | let actions = $ | |
594 | - | let wlgClaimedAmount = $ | |
600 | + | let $t01125411330 = stakeUnstakeAcresInternal(amt, address, 0) | |
601 | + | let actions = $t01125411330._1 | |
602 | + | let wlgClaimedAmount = $t01125411330._2 | |
595 | 603 | let promoActions = if (if ((height >= DAILY_PROMO_START_BLOCK)) | |
596 | 604 | then (DAILY_PROMO_END_BLOCK > height) | |
597 | 605 | else false) | |
598 | 606 | then { | |
599 | 607 | let promoAcresKey = keyUserPromoAcres(address) | |
600 | 608 | let promoAcres = ((if (shouldCleanPromo) | |
601 | 609 | then 0 | |
602 | 610 | else valueOrElse(getInteger(promoAcresKey), 0)) + amt) | |
603 | 611 | let tickets = (promoAcres / MULT8) | |
604 | 612 | let ticketsKey = keyUserPromoTickets(address) | |
605 | 613 | let deltaTickets = (tickets - valueOrElse(getInteger(ticketsKey), 0)) | |
606 | 614 | let totalTickets = (valueOrElse(getInteger(keyTotalPromoTickets), 0) + deltaTickets) | |
607 | 615 | if (if (shouldCleanPromo) | |
608 | 616 | then true | |
609 | 617 | else (deltaTickets > 0)) | |
610 | 618 | then { | |
611 | 619 | let promoMap = valueOrElse(getString(keyPromoMap), "") | |
612 | 620 | let userRecord = ((address + ":") + padL(tickets, 3)) | |
613 | 621 | let newMap = if (contains(promoMap, address)) | |
614 | 622 | then { | |
615 | 623 | let mapParts = split_51C(promoMap, address) | |
616 | 624 | if ((mapParts[0] == "")) | |
617 | 625 | then { | |
618 | 626 | let r = drop(mapParts[1], 4) | |
619 | 627 | if ((r == "")) | |
620 | 628 | then if ((tickets == 0)) | |
621 | 629 | then "" | |
622 | 630 | else userRecord | |
623 | 631 | else if ((tickets == 0)) | |
624 | 632 | then drop(r, 1) | |
625 | 633 | else (userRecord + r) | |
626 | 634 | } | |
627 | 635 | else { | |
628 | 636 | let r = drop(mapParts[1], 4) | |
629 | 637 | if ((r == "")) | |
630 | 638 | then if ((tickets == 0)) | |
631 | 639 | then dropRight(mapParts[0], 1) | |
632 | 640 | else (mapParts[0] + userRecord) | |
633 | 641 | else if ((tickets == 0)) | |
634 | 642 | then (mapParts[0] + drop(r, 1)) | |
635 | 643 | else ((mapParts[0] + userRecord) + r) | |
636 | 644 | } | |
637 | 645 | } | |
638 | 646 | else if ((tickets == 0)) | |
639 | 647 | then promoMap | |
640 | 648 | else if ((promoMap == "")) | |
641 | 649 | then userRecord | |
642 | 650 | else ((promoMap + "_") + userRecord) | |
643 | 651 | [IntegerEntry(promoAcresKey, promoAcres), IntegerEntry(ticketsKey, tickets), IntegerEntry(keyTotalPromoTickets, totalTickets), StringEntry(keyPromoMap, newMap)] | |
644 | 652 | } | |
645 | 653 | else [IntegerEntry(promoAcresKey, promoAcres)] | |
646 | 654 | } | |
647 | 655 | else nil | |
648 | 656 | $Tuple2((actions ++ promoActions), wlgClaimedAmount) | |
649 | 657 | } | |
650 | 658 | ||
651 | 659 | ||
652 | 660 | @Callable(i) | |
653 | 661 | func saveLastTx () = if (!(containsElement([wlgContract, marketContract], i.caller))) | |
654 | 662 | then throw("Access denied") | |
655 | 663 | else $Tuple2(prolog(i), 42) | |
656 | 664 | ||
657 | 665 | ||
658 | 666 | ||
659 | 667 | @Callable(i) | |
660 | 668 | func constructorV1 (rest2Addr,oldAcrContract) = if ((i.caller != this)) | |
661 | 669 | then throw("Permission denied") | |
662 | 670 | else { | |
663 | 671 | let oldAcrContAddr = addressFromStringValue(oldAcrContract) | |
664 | 672 | [IntegerEntry(acresIssuedAmountKey, getIntegerValue(oldAcrContAddr, acresIssuedAmountKey)), BinaryEntry(acresAssetIdKey, getBinaryValue(oldAcrContAddr, acresAssetIdKey)), StringEntry(keyRest2Address(), rest2Addr), StringEntry(oldAcresContractKey, oldAcrContract)] | |
665 | 673 | } | |
666 | 674 | ||
667 | 675 | ||
668 | 676 | ||
669 | 677 | @Callable(i) | |
670 | 678 | func setBlocked (isBlocked) = if ((i.caller != this)) | |
671 | 679 | then throw("permission denied") | |
672 | 680 | else [BooleanEntry(keyBlocked(), isBlocked)] | |
673 | 681 | ||
674 | 682 | ||
675 | 683 | ||
676 | 684 | @Callable(i) | |
677 | 685 | func unstakeAcres (amount) = { | |
678 | 686 | let prologActions = prolog(i) | |
679 | 687 | if (if ((height >= DAILY_PROMO_START_BLOCK)) | |
680 | 688 | then (DAILY_PROMO_END_BLOCK > height) | |
681 | 689 | else false) | |
682 | 690 | then throw("You can't unstake during Xmas promo period") | |
683 | 691 | else if ((0 >= amount)) | |
684 | 692 | then throw("Amount should be positive") | |
685 | 693 | else { | |
686 | 694 | let address = toString(i.caller) | |
687 | 695 | if ((size(i.payments) != 0)) | |
688 | 696 | then throw("No payments required") | |
689 | 697 | else { | |
690 | 698 | let arbReleaseTime = (valueOrElse(getInteger(wlgContract, keyLastWlgTradeTimeByUser(address)), 0) + arbitrageDelay) | |
691 | 699 | if ((arbReleaseTime > lastBlock.timestamp)) | |
692 | 700 | then throw(("You traded some WLGOLD, cannot unstake until " + toString(arbReleaseTime))) | |
693 | 701 | else { | |
694 | - | let $ | |
695 | - | let actions = $ | |
696 | - | let wlgClaimedAmount = $ | |
702 | + | let $t01533315413 = stakeUnstakeAcresInternal(-(amount), address, 0) | |
703 | + | let actions = $t01533315413._1 | |
704 | + | let wlgClaimedAmount = $t01533315413._2 | |
697 | 705 | $Tuple2(((actions :+ ScriptTransfer(i.caller, amount, acresAssetId)) ++ prologActions), wlgClaimedAmount) | |
698 | 706 | } | |
699 | 707 | } | |
700 | 708 | } | |
701 | 709 | } | |
702 | 710 | ||
703 | 711 | ||
704 | 712 | ||
705 | 713 | @Callable(i) | |
706 | 714 | func stakeAcres () = { | |
707 | 715 | let prologActions = prolog(i) | |
708 | 716 | let address = toString(i.caller) | |
709 | 717 | if ((size(i.payments) != 1)) | |
710 | 718 | then throw("exactly 1 payment must be attached") | |
711 | 719 | else { | |
712 | 720 | let pmt = i.payments[0] | |
713 | 721 | let amt = pmt.amount | |
714 | 722 | if (if (!(isDefined(pmt.assetId))) | |
715 | 723 | then true | |
716 | 724 | else (value(pmt.assetId) != acresAssetId)) | |
717 | 725 | then throw("ACRES payments only!") | |
718 | 726 | else { | |
719 | - | let $ | |
720 | - | let stakeActions = $ | |
721 | - | let wlgClaimedAmount = $ | |
727 | + | let $t01586415945 = stakeAcresForInternal(address, amt, false) | |
728 | + | let stakeActions = $t01586415945._1 | |
729 | + | let wlgClaimedAmount = $t01586415945._2 | |
722 | 730 | $Tuple2((stakeActions ++ prologActions), wlgClaimedAmount) | |
723 | 731 | } | |
724 | 732 | } | |
725 | 733 | } | |
726 | 734 | ||
727 | 735 | ||
728 | 736 | ||
729 | 737 | @Callable(i) | |
730 | 738 | func stakeAcresFor (address,amt,shouldCleanPromo) = if ((i.caller != this)) | |
731 | 739 | then throw("Permission denied") | |
732 | 740 | else stakeAcresForInternal(address, amt, shouldCleanPromo) | |
733 | 741 | ||
734 | 742 | ||
735 | 743 | ||
736 | 744 | @Callable(i) | |
737 | 745 | func buyAcres () = { | |
738 | 746 | let prologActions = prolog(i) | |
739 | 747 | if ((size(i.payments) != 1)) | |
740 | 748 | then throw("exactly 1 payment must be attached") | |
741 | 749 | else { | |
742 | 750 | let pmt = i.payments[0] | |
743 | 751 | let usdtAmount = pmt.amount | |
744 | 752 | if (if (!(isDefined(pmt.assetId))) | |
745 | 753 | then true | |
746 | 754 | else (value(pmt.assetId) != usdtAssetId)) | |
747 | 755 | then throw("USDT payments only!") | |
748 | 756 | else if ((MULT6 > usdtAmount)) | |
749 | 757 | then throw((("Min payment should be " + fixedPoint(MULT6, 6)) + " USDT")) | |
750 | 758 | else { | |
751 | 759 | let acresAmount = (usdtAmount * USDT2ACRES_MULTIPLIER) | |
752 | 760 | let wlgAmount = fraction(usdtAmount, MULT8, getWlgPrice(usdtAmount)) | |
753 | 761 | let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey)) | |
754 | 762 | let req = invoke(oldAcresAddress, "requestAcresCallback", [acresAmount], nil) | |
755 | 763 | if ((req == req)) | |
756 | 764 | then { | |
757 | 765 | let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [wlgAmount], nil)) | |
758 | 766 | $Tuple2(([ScriptTransfer(i.caller, acresAmount, acresAssetId)] ++ prologActions), wlgRemain) | |
759 | 767 | } | |
760 | 768 | else throw("Strict value is not equal to itself.") | |
761 | 769 | } | |
762 | 770 | } | |
763 | 771 | } | |
764 | 772 | ||
765 | 773 | ||
766 | 774 | ||
767 | 775 | @Callable(i) | |
768 | 776 | func buyAcresREADONLY (usdtAmount) = { | |
769 | 777 | let acresAmount = (usdtAmount * USDT2ACRES_MULTIPLIER) | |
770 | 778 | let wlgToBurn = fraction(usdtAmount, MULT8, getWlgPrice(usdtAmount)) | |
771 | 779 | $Tuple2(nil, [acresAmount, MULT6, acresAmount, wlgToBurn]) | |
772 | 780 | } | |
773 | 781 | ||
774 | 782 | ||
775 | 783 | ||
776 | 784 | @Callable(i) | |
777 | 785 | func sellAcres () = { | |
778 | 786 | let prologActions = prolog(i) | |
779 | 787 | if ((size(i.payments) != 1)) | |
780 | 788 | then throw("exactly 1 payment must be attached") | |
781 | 789 | else { | |
782 | 790 | let pmt = i.payments[0] | |
783 | 791 | let acresAmount = pmt.amount | |
784 | 792 | if (if (!(isDefined(pmt.assetId))) | |
785 | 793 | then true | |
786 | 794 | else (value(pmt.assetId) != acresAssetId)) | |
787 | 795 | then throw("ACRES payments only!") | |
788 | 796 | else if ((MULT7 > acresAmount)) | |
789 | 797 | then throw((("Min payment should be " + fixedPoint(MULT7, 8)) + " ACRES")) | |
790 | 798 | else { | |
791 | 799 | let addr = toString(i.caller) | |
792 | - | let $ | |
793 | - | let limitAction = $ | |
794 | - | let maxUsdt = $ | |
800 | + | let $t01801718065 = getSwapLimitAcres() | |
801 | + | let limitAction = $t01801718065._1 | |
802 | + | let maxUsdt = $t01801718065._2 | |
795 | 803 | let maxAcres = (maxUsdt * USDT2ACRES_MULTIPLIER) | |
796 | 804 | if ((acresAmount > maxAcres)) | |
797 | 805 | then throw((("You can sell max " + fixedPoint(maxAcres, 8)) + " ACRES")) | |
798 | 806 | else { | |
799 | 807 | let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2) | |
800 | 808 | $Tuple2(([limitAction, IntegerEntry(keyLastLimitLeft, (maxUsdt - usdtAmount)), ScriptTransfer(i.caller, usdtAmount, usdtAssetId)] ++ prologActions), usdtAmount) | |
801 | 809 | } | |
802 | 810 | } | |
803 | 811 | } | |
804 | 812 | } | |
805 | 813 | ||
806 | 814 | ||
807 | 815 | ||
808 | 816 | @Callable(i) | |
809 | 817 | func sellAcresREADONLY (address,acresAmount) = { | |
810 | - | let $ | |
811 | - | let limitAction = $ | |
812 | - | let maxUsdt = $ | |
818 | + | let $t01856118609 = getSwapLimitAcres() | |
819 | + | let limitAction = $t01856118609._1 | |
820 | + | let maxUsdt = $t01856118609._2 | |
813 | 821 | let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2) | |
814 | 822 | $Tuple2(nil, [usdtAmount, MULT7, (maxUsdt * USDT2ACRES_MULTIPLIER), 0]) | |
815 | 823 | } | |
816 | 824 | ||
817 | 825 | ||
818 | 826 | ||
819 | 827 | @Callable(i) | |
820 | 828 | func convertOldStakes () = { | |
821 | 829 | let prologActions = prolog(i) | |
822 | 830 | if ((OLD_STAKING_DEADL > lastBlock.timestamp)) | |
823 | 831 | then throw(("Disabled until " + toString((OLD_STAKING_DEADL / 1000)))) | |
824 | 832 | else { | |
825 | 833 | let address = toString(i.caller) | |
826 | 834 | if ((size(i.payments) != 0)) | |
827 | 835 | then throw("No payments required") | |
828 | 836 | else { | |
829 | 837 | let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey)) | |
830 | 838 | let amount = valueOrElse(getInteger(oldAcresAddress, keyAcresStakedAmtByUser(address)), 0) | |
831 | 839 | let gotAcres0 = if ((amount > 0)) | |
832 | 840 | then asTuple2Ints(invoke(oldAcresAddress, "unstakeAcresCallback", [amount, address], nil)) | |
833 | 841 | else $Tuple2(0, 0) | |
834 | 842 | let oldStakingAddress = addressFromStringValue(oldStakingContractStr) | |
835 | 843 | let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address)) | |
836 | 844 | let landsResult = if (isDefined(landsStr)) | |
837 | 845 | then { | |
838 | 846 | let lands = split_51C(value(landsStr), "_") | |
839 | 847 | if ((size(lands) > MAX_LANDS_TO_CONVERT)) | |
840 | 848 | then throw((("You have more than " + toString(MAX_LANDS_TO_CONVERT)) + " lands staked, please contact support, we'll process your case manually")) | |
841 | 849 | else { | |
842 | 850 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
843 | 851 | then throw("landAssetId is required") | |
844 | 852 | else { | |
845 | 853 | let r = asTuple5Ints(invoke(oldStakingAddress, "unstakeLandCallback", [landAssetId, address], nil)) | |
846 | 854 | if ((r == r)) | |
847 | 855 | then $Tuple5((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4), (acc._5 + r._5)) | |
848 | 856 | else throw("Strict value is not equal to itself.") | |
849 | 857 | } | |
850 | 858 | ||
851 | 859 | let rr = { | |
852 | 860 | let $l = lands | |
853 | 861 | let $s = size($l) | |
854 | 862 | let $acc0 = $Tuple5(0, 0, 0, 0, 0) | |
855 | 863 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
856 | 864 | then $a | |
857 | 865 | else oneLand($a, $l[$i]) | |
858 | 866 | ||
859 | 867 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
860 | 868 | then $a | |
861 | 869 | else throw("List size exceeds 14") | |
862 | 870 | ||
863 | 871 | $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14) | |
864 | 872 | } | |
865 | 873 | if ((rr == rr)) | |
866 | 874 | then { | |
867 | 875 | let finalize = invoke(oldStakingAddress, "unstakeLandsFinalizeCallback", [address], nil) | |
868 | 876 | if ((finalize == finalize)) | |
869 | 877 | then { | |
870 | 878 | let req = invoke(oldAcresAddress, "requestAcresCallback", [(((rr._1 + rr._2) + rr._3) + rr._4)], nil) | |
871 | 879 | if ((req == req)) | |
872 | 880 | then { | |
873 | - | let $ | |
874 | - | let nftActions = $ | |
875 | - | let nftAssetId = $ | |
881 | + | let $t02112321262 = issueNftCustom(idxNameShovel, idxKeySP, idxCollDig, idxRarityP, 3, idxDescrShovel, idxBonusTypeFp, i.caller) | |
882 | + | let nftActions = $t02112321262._1 | |
883 | + | let nftAssetId = $t02112321262._2 | |
876 | 884 | $Tuple6(rr._1, rr._2, rr._3, rr._4, rr._5, nftActions) | |
877 | 885 | } | |
878 | 886 | else throw("Strict value is not equal to itself.") | |
879 | 887 | } | |
880 | 888 | else throw("Strict value is not equal to itself.") | |
881 | 889 | } | |
882 | 890 | else throw("Strict value is not equal to itself.") | |
883 | 891 | } | |
884 | 892 | } | |
885 | 893 | else $Tuple6(0, 0, 0, 0, 0, nil) | |
886 | 894 | let duckAssetId = valueOrElse(getString(oldStakingAddress, keyStakedDuckByOwner(address)), "") | |
887 | 895 | let duckResult = if ((duckAssetId != "")) | |
888 | 896 | then asTuple3Ints(invoke(oldStakingAddress, "unstakeDuckCallback", [duckAssetId, address], nil)) | |
889 | 897 | else $Tuple3(0, 0, 0) | |
890 | 898 | let x = stakeUnstakeAcresInternal((((((((gotAcres0._1 + landsResult._1) + landsResult._2) + landsResult._3) + landsResult._4) + duckResult._1) + duckResult._2) + duckResult._3), address, 0) | |
891 | 899 | $Tuple2(((landsResult._6 ++ x._1) ++ prologActions), $Tuple3(gotAcres0._2, landsResult._5, x._2)) | |
892 | 900 | } | |
893 | 901 | } | |
894 | 902 | } | |
895 | 903 | ||
896 | 904 | ||
897 | 905 | ||
898 | 906 | @Callable(i) | |
899 | 907 | func unstakeLandsREADONLY (address) = { | |
900 | 908 | let oldStakingAddress = addressFromStringValue(oldStakingContractStr) | |
901 | 909 | let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address)) | |
902 | 910 | let landsResult = if (isDefined(landsStr)) | |
903 | 911 | then { | |
904 | 912 | let lands = split_51C(value(landsStr), "_") | |
905 | 913 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
906 | 914 | then throw("landAssetId is required") | |
907 | 915 | else { | |
908 | 916 | let r = asTuple4Ints(invoke(oldStakingAddress, "unstakeLandREADONLY", [landAssetId, address], nil)) | |
909 | 917 | $Tuple4((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4)) | |
910 | 918 | } | |
911 | 919 | ||
912 | 920 | let $l = lands | |
913 | 921 | let $s = size($l) | |
914 | 922 | let $acc0 = $Tuple4(0, 0, 0, 0) | |
915 | 923 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
916 | 924 | then $a | |
917 | 925 | else oneLand($a, $l[$i]) | |
918 | 926 | ||
919 | 927 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
920 | 928 | then $a | |
921 | 929 | else throw("List size exceeds 100") | |
922 | 930 | ||
923 | 931 | $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($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($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($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($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($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), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
924 | 932 | } | |
925 | 933 | else $Tuple4(0, 0, 0, 0) | |
926 | 934 | $Tuple2(nil, landsResult) | |
927 | 935 | } | |
928 | 936 | ||
929 | 937 | ||
930 | 938 | ||
931 | 939 | @Callable(i) | |
932 | 940 | func stakeAcresCallback (addr) = if ((i.caller != addressFromStringValue(oldStakingContractStr))) | |
933 | 941 | then throw("Permission denied") | |
934 | 942 | else stakeUnstakeAcresInternal(i.payments[0].amount, addr, 0) | |
935 | 943 | ||
936 | 944 | ||
937 | 945 | ||
938 | 946 | @Callable(i) | |
939 | 947 | func simulateStakeAcresREADONLY (address,addedAmount) = { | |
940 | 948 | let amountKey = keyAcresStakedAmtByUser(address) | |
941 | 949 | let newAcresAmount = (valueOrElse(getInteger(amountKey), 0) + addedAmount) | |
942 | 950 | let oldTotal = valueOrElse(getInteger(acresStakdTotalKey), 0) | |
943 | 951 | let userFpKey = keyFarmingPowerByUser(address) | |
944 | 952 | let oldFp = valueOrElse(getInteger(userFpKey), 0) | |
945 | 953 | let userBonus = valueOrElse(getInteger(acres2Contract, keyUserFullBonus(address)), 0) | |
946 | - | let $ | |
947 | - | let newBonusedFp = $ | |
948 | - | let ignored = $ | |
954 | + | let $t02353323620 = getFarmingPowerByAcresAndBonus(newAcresAmount, userBonus) | |
955 | + | let newBonusedFp = $t02353323620._1 | |
956 | + | let ignored = $t02353323620._2 | |
949 | 957 | let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0) | |
950 | 958 | let newTotalFp = ((oldTotalFp + newBonusedFp) - oldFp) | |
951 | 959 | $Tuple2(nil, [oldFp, newBonusedFp, oldTotalFp, newTotalFp]) | |
952 | 960 | } | |
953 | 961 | ||
954 | 962 | ||
955 | 963 | ||
956 | 964 | @Callable(i) | |
957 | 965 | func issuePickC1 (forAddress) = if ((i.caller != wlgContract)) | |
958 | 966 | then throw("Permission denied") | |
959 | 967 | else issueNftCustom(idxNamePickaxe, idxKeyC, idxCollDig, idxRarityC, 1, idxDescrPickaxe, idxBonusTypeFp, addressFromStringValue(forAddress)) | |
968 | + | ||
969 | + | ||
970 | + | ||
971 | + | @Callable(i) | |
972 | + | func issueMittenP (forAddress) = if ((i.caller != this)) | |
973 | + | then throw("Permission denied") | |
974 | + | else issueNftCustom(idxNameMitten, idxKeyMP, idxCollNNewYear, idxRarityP, 3, idxDescrMitten, idxBonusTypeFp, addressFromStringValue(forAddress)) | |
960 | 975 | ||
961 | 976 | ||
962 | 977 | ||
963 | 978 | @Callable(i) | |
964 | 979 | func stakeNFT () = { | |
965 | 980 | let prologActions = prolog(i) | |
966 | 981 | if ((size(i.payments) != 1)) | |
967 | 982 | then throw("Exactly one payment required") | |
968 | 983 | else { | |
969 | 984 | let pmt = value(i.payments[0]) | |
970 | 985 | if ((pmt.amount != 1)) | |
971 | 986 | then throw("NFT token should be attached as payment") | |
972 | 987 | else { | |
973 | 988 | let assetId = value(pmt.assetId) | |
974 | 989 | let asset = value(assetInfo(assetId)) | |
975 | 990 | let assetIdStr = toBase58String(assetId) | |
976 | 991 | let addr = toString(i.caller) | |
977 | 992 | let nftsKey = keyStakedNFTsByOwner(addr) | |
978 | 993 | let nftsStr = getString(nftsKey) | |
979 | 994 | let nfts = if (isDefined(nftsStr)) | |
980 | 995 | then split_4C(value(nftsStr), "_") | |
981 | 996 | else nil | |
982 | 997 | if (containsElement(nfts, assetIdStr)) | |
983 | 998 | then throw(("Your staked NFTs already contain " + assetIdStr)) | |
984 | 999 | else if ((size(nfts) >= MAX_NFTS_STAKED_BY_USER)) | |
985 | 1000 | then throw((("Your already staked max (" + toString(MAX_NFTS_STAKED_BY_USER)) + ") NFTs")) | |
986 | 1001 | else { | |
987 | 1002 | let listAction = StringEntry(nftsKey, makeString_2C((nfts :+ assetIdStr), "_")) | |
988 | 1003 | if ((asset.issuer == this)) | |
989 | 1004 | then { | |
990 | - | let $ | |
991 | - | let actions = $ | |
992 | - | let wlgClaimedAmount = $ | |
1005 | + | let $t02532025510 = stakeNftInternal(addr, assetIdStr, (bonusByDescription(value(asset.description)) * 10000), keyUserWlNftNumber(addr), keyWlNftTotalStaked, MAX_WL_NFTS) | |
1006 | + | let actions = $t02532025510._1 | |
1007 | + | let wlgClaimedAmount = $t02532025510._2 | |
993 | 1008 | $Tuple2(((prologActions ++ actions) :+ listAction), wlgClaimedAmount) | |
994 | 1009 | } | |
995 | 1010 | else if ((isArkimalIssued(asset) == "")) | |
996 | 1011 | then throw("Only WavesLands and Arkimals NFT tokens are accepted") | |
997 | 1012 | else { | |
998 | - | let $ | |
999 | - | let actions = $ | |
1000 | - | let wlgClaimedAmount = $ | |
1013 | + | let $t02569125842 = stakeNftInternal(addr, assetIdStr, ARK_NFT_BONUS, keyUserArkNftNumber(addr), keyArkNftTotalStaked, MAX_ARK_NFTS) | |
1014 | + | let actions = $t02569125842._1 | |
1015 | + | let wlgClaimedAmount = $t02569125842._2 | |
1001 | 1016 | $Tuple2(((prologActions ++ actions) :+ listAction), wlgClaimedAmount) | |
1002 | 1017 | } | |
1003 | 1018 | } | |
1004 | 1019 | } | |
1005 | 1020 | } | |
1006 | 1021 | } | |
1007 | 1022 | ||
1008 | 1023 | ||
1009 | 1024 | ||
1010 | 1025 | @Callable(i) | |
1011 | 1026 | func unstakeNFT (assetIdStr) = { | |
1012 | 1027 | let prologActions = prolog(i) | |
1013 | 1028 | if ((size(i.payments) != 0)) | |
1014 | 1029 | then throw("No payments required") | |
1015 | 1030 | else { | |
1016 | 1031 | let assetId = fromBase58String(assetIdStr) | |
1017 | 1032 | let addr = toString(i.caller) | |
1018 | 1033 | let asset = value(assetInfo(assetId)) | |
1019 | 1034 | let timeKey = keyStakedTimeByAssetIdAndOwner(assetIdStr, addr) | |
1020 | 1035 | if (!(isDefined(getInteger(timeKey)))) | |
1021 | 1036 | then throw((("NFT " + asset.name) + " is not staked by you")) | |
1022 | 1037 | else { | |
1023 | 1038 | let nftsKey = keyStakedNFTsByOwner(addr) | |
1024 | 1039 | let nfts = split_4C(valueOrElse(getString(nftsKey), ""), "_") | |
1025 | 1040 | let idx = indexOf(nfts, assetIdStr) | |
1026 | 1041 | if (!(isDefined(idx))) | |
1027 | 1042 | then throw(("Your staked NFTs don't contain " + assetIdStr)) | |
1028 | 1043 | else { | |
1029 | 1044 | let listAction = if ((size(nfts) > 1)) | |
1030 | 1045 | then StringEntry(nftsKey, makeString_2C(removeByIndex(nfts, value(idx)), "_")) | |
1031 | 1046 | else DeleteEntry(nftsKey) | |
1032 | 1047 | let isWL = (asset.issuer == this) | |
1033 | 1048 | if (isWL) | |
1034 | 1049 | then { | |
1035 | 1050 | let wlNftNumber = valueOrElse(getInteger(keyUserWlNftNumber(addr)), 0) | |
1036 | 1051 | let bonusVal = (bonusByDescription(value(asset.description)) * 10000) | |
1037 | - | let $ | |
1038 | - | let actions = $ | |
1039 | - | let wlgClaimedAmount = $ | |
1052 | + | let $t02700727086 = stakeUnstakeAcresInternal(0, addr, -(bonusVal)) | |
1053 | + | let actions = $t02700727086._1 | |
1054 | + | let wlgClaimedAmount = $t02700727086._2 | |
1040 | 1055 | $Tuple2(((((((actions :+ listAction) :+ IntegerEntry(keyUserWlNftNumber(addr), (wlNftNumber - 1))) :+ IntegerEntry(keyWlNftTotalStaked, max([0, (valueOrElse(getInteger(keyWlNftTotalStaked), 0) - 1)]))) :+ DeleteEntry(keyStakedTimeByAssetIdAndOwner(toBase58String(assetId), addr))) :+ ScriptTransfer(i.caller, 1, assetId)) ++ prologActions), wlgClaimedAmount) | |
1041 | 1056 | } | |
1042 | 1057 | else { | |
1043 | 1058 | let arkimalName = isArkimalIssued(asset) | |
1044 | 1059 | if ((arkimalName == "")) | |
1045 | 1060 | then throw("Only WavesLands and Arkimals NFT tokens are accepted") | |
1046 | 1061 | else { | |
1047 | 1062 | let arkNftNumber = valueOrElse(getInteger(keyUserArkNftNumber(addr)), 0) | |
1048 | - | let $ | |
1049 | - | let actions = $ | |
1050 | - | let wlgClaimedAmount = $ | |
1063 | + | let $t02774627830 = stakeUnstakeAcresInternal(0, addr, -(ARK_NFT_BONUS)) | |
1064 | + | let actions = $t02774627830._1 | |
1065 | + | let wlgClaimedAmount = $t02774627830._2 | |
1051 | 1066 | $Tuple2((((((actions :+ listAction) :+ IntegerEntry(keyUserArkNftNumber(addr), (arkNftNumber - 1))) :+ DeleteEntry(keyStakedTimeByAssetIdAndOwner(toBase58String(assetId), addr))) :+ ScriptTransfer(i.caller, 1, assetId)) ++ prologActions), wlgClaimedAmount) | |
1052 | 1067 | } | |
1053 | 1068 | } | |
1054 | 1069 | } | |
1055 | 1070 | } | |
1056 | 1071 | } | |
1057 | 1072 | } | |
1058 | 1073 | ||
1059 | 1074 | ||
1060 | 1075 | ||
1061 | 1076 | @Callable(i) | |
1062 | - | func exchangeNFTs () = { | |
1063 | - | let prologActions = prolog(i) | |
1064 | - | if ((3 > size(i.payments))) | |
1065 | - | then throw("Min one WLGOLD and 2 NFT payments allowed") | |
1066 | - | else if ((size(i.payments) > 10)) | |
1067 | - | then throw("Max one WLGOLD and 9 NFT payments allowed") | |
1068 | - | else { | |
1069 | - | let addr = toString(i.caller) | |
1070 | - | func addUp (acc,pmt) = { | |
1071 | - | let assetId = valueOrErrorMessage(pmt.assetId, "WAVES payments not allowed") | |
1072 | - | if ((assetId == wlgAssetId)) | |
1073 | - | then $Tuple4((acc._1 + pmt.amount), acc._2, acc._3, acc._4) | |
1074 | - | else { | |
1075 | - | let asset = value(assetInfo(assetId)) | |
1076 | - | if ((asset.issuer != this)) | |
1077 | - | then throw("Only WL-issued NFTs allowed") | |
1078 | - | else { | |
1079 | - | let rarityIx = rarityIdxByDescriprion(value(asset.description)) | |
1080 | - | if (if ((acc._4 > 0)) | |
1081 | - | then (rarityIx != acc._4) | |
1082 | - | else false) | |
1083 | - | then throw("You can exchange only NFTs of the same rarity") | |
1084 | - | else { | |
1085 | - | let bonusPerc = bonusByDescription(value(asset.description)) | |
1086 | - | $Tuple4(acc._1, (acc._2 + bonusPerc), (acc._3 :+ Burn(assetId, 1)), rarityIx) | |
1087 | - | } | |
1088 | - | } | |
1089 | - | } | |
1090 | - | } | |
1077 | + | func exchangeNFTs () = if ((i.caller != this)) | |
1078 | + | then throw("Temporary disabled") | |
1079 | + | else { | |
1080 | + | let prologActions = prolog(i) | |
1081 | + | if ((3 > size(i.payments))) | |
1082 | + | then throw("Min one WLGOLD and 2 NFT payments allowed") | |
1083 | + | else if ((size(i.payments) > 10)) | |
1084 | + | then throw("Max one WLGOLD and 9 NFT payments allowed") | |
1085 | + | else { | |
1086 | + | let addr = toString(i.caller) | |
1087 | + | func addUp (acc,pmt) = { | |
1088 | + | let assetId = valueOrErrorMessage(pmt.assetId, "WAVES payments not allowed") | |
1089 | + | if ((assetId == wlgAssetId)) | |
1090 | + | then $Tuple4((acc._1 + pmt.amount), acc._2, acc._3, acc._4) | |
1091 | + | else { | |
1092 | + | let asset = value(assetInfo(assetId)) | |
1093 | + | if ((asset.issuer != this)) | |
1094 | + | then throw("Only WL-issued NFTs allowed") | |
1095 | + | else { | |
1096 | + | let rarityIx = rarityIdxByDescriprion(value(asset.description)) | |
1097 | + | if (if ((acc._4 > 0)) | |
1098 | + | then (rarityIx != acc._4) | |
1099 | + | else false) | |
1100 | + | then throw("You can exchange only NFTs of the same rarity") | |
1101 | + | else { | |
1102 | + | let bonusPerc = bonusByDescription(value(asset.description)) | |
1103 | + | $Tuple4(acc._1, (acc._2 + bonusPerc), (acc._3 :+ Burn(assetId, 1)), rarityIx) | |
1104 | + | } | |
1105 | + | } | |
1106 | + | } | |
1107 | + | } | |
1091 | 1108 | ||
1092 | - | let $ | |
1093 | - | let $l = i.payments | |
1094 | - | let $s = size($l) | |
1095 | - | let $acc0 = $Tuple4(0, 0, nil, -1) | |
1096 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1097 | - | then $a | |
1098 | - | else addUp($a, $l[$i]) | |
1109 | + | let $t02928129497 = { | |
1110 | + | let $l = i.payments | |
1111 | + | let $s = size($l) | |
1112 | + | let $acc0 = $Tuple4(0, 0, nil, -1) | |
1113 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1114 | + | then $a | |
1115 | + | else addUp($a, $l[$i]) | |
1099 | 1116 | ||
1100 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1101 | - | then $a | |
1102 | - | else throw("List size exceeds 10") | |
1117 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1118 | + | then $a | |
1119 | + | else throw("List size exceeds 10") | |
1103 | 1120 | ||
1104 | - | $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) | |
1105 | - | } | |
1106 | - | let wlgFee = $t02890629122._1 | |
1107 | - | let totalBonus = $t02890629122._2 | |
1108 | - | let burnActions = $t02890629122._3 | |
1109 | - | let rarityIdx = $t02890629122._4 | |
1110 | - | let newRarityIdx = if ((rarityIdx == idxRarityC)) | |
1111 | - | then if ((rarityThresholds[idxThresholdC] > totalBonus)) | |
1112 | - | then idxRarityC | |
1113 | - | else if ((rarityThresholds[idxThresholdU] > totalBonus)) | |
1114 | - | then idxRarityU | |
1115 | - | else throw((("You can advance only one level of rarity, max total bonus " + toString(rarityThresholds[idxThresholdU])) + "%")) | |
1116 | - | else if ((rarityIdx == idxRarityU)) | |
1117 | - | then if ((rarityThresholds[idxThresholdU] > totalBonus)) | |
1118 | - | then idxRarityU | |
1119 | - | else if ((rarityThresholds[idxThresholdL] > totalBonus)) | |
1120 | - | then idxRarityL | |
1121 | - | else throw((("You can advance only one level of rarity, max total bonus " + toString(rarityThresholds[idxThresholdL])) + "%")) | |
1122 | - | else if ((rarityIdx == idxRarityL)) | |
1123 | - | then if ((rarityThresholds[idxThresholdL] > totalBonus)) | |
1124 | - | then idxRarityL | |
1125 | - | else idxRarityE | |
1126 | - | else if ((rarityIdx == idxRarityE)) | |
1127 | - | then idxRarityE | |
1128 | - | else if ((rarityIdx == idxRarityP)) | |
1129 | - | then throw("You can't exchange NFTs of this rarity") | |
1130 | - | else throw("Unknown rarity") | |
1131 | - | let minWlgFee = fraction(totalBonus, MULT14, getWlgPrice(0)) | |
1132 | - | let change = (wlgFee - minWlgFee) | |
1133 | - | let forTeam = (minWlgFee / 2) | |
1134 | - | let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [(minWlgFee - forTeam)], nil)) | |
1135 | - | if ((0 > change)) | |
1136 | - | then throw((("You need to attach " + fixedPoint(minWlgFee, 8)) + " WLGOLD as fee")) | |
1137 | - | else { | |
1138 | - | let changeActions = if ((change > 0)) | |
1139 | - | then [ScriptTransfer(i.caller, change, wlgAssetId)] | |
1140 | - | else nil | |
1141 | - | let $t03065930820 = issueNftCustom(idxNamePickaxe, newRarityIdx, idxCollDig, newRarityIdx, totalBonus, idxDescrPickaxe, idxBonusTypeFp, i.caller) | |
1142 | - | let issueNftActions = $t03065930820._1 | |
1143 | - | let nftAssetId = $t03065930820._2 | |
1144 | - | let burned = size(burnActions) | |
1145 | - | let burnCounterActions = if ((burned == 0)) | |
1146 | - | then nil | |
1147 | - | else [IntegerEntry(keyNftTotalBurned, (valueOrElse(getInteger(keyNftTotalBurned), 0) + burned))] | |
1148 | - | $Tuple2((((((issueNftActions ++ burnActions) ++ burnCounterActions) ++ prologActions) ++ changeActions) :+ ScriptTransfer(addressFromStringValue(getStringValue(wlgContract, teamAddrKey)), forTeam, wlgAssetId)), $Tuple2(nftAssetId, wlgRemain)) | |
1121 | + | $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) | |
1149 | 1122 | } | |
1150 | - | } | |
1151 | - | } | |
1152 | - | ||
1153 | - | ||
1154 | - | ||
1155 | - | @Callable(i) | |
1156 | - | func openNftChest () = { | |
1157 | - | let prologActions = prolog(i) | |
1158 | - | if ((size(i.payments) != 1)) | |
1159 | - | then throw("exactly 1 payment must be attached") | |
1160 | - | else { | |
1161 | - | let pmt = i.payments[0] | |
1162 | - | let wlgAmount = pmt.amount | |
1163 | - | if (if (!(isDefined(pmt.assetId))) | |
1164 | - | then true | |
1165 | - | else (value(pmt.assetId) != wlgAssetId)) | |
1166 | - | then throw("WLGOLD payments only!") | |
1167 | - | else { | |
1168 | - | let minWlgFee = fraction(NFT_CHEST_PRICE_USDT, MULT8, getWlgPrice(0)) | |
1169 | - | let change = (wlgAmount - minWlgFee) | |
1123 | + | let wlgFee = $t02928129497._1 | |
1124 | + | let totalBonus = $t02928129497._2 | |
1125 | + | let burnActions = $t02928129497._3 | |
1126 | + | let rarityIdx = $t02928129497._4 | |
1127 | + | let newRarityIdx = if ((rarityIdx == idxRarityC)) | |
1128 | + | then if ((rarityThresholds[idxThresholdC] > totalBonus)) | |
1129 | + | then idxRarityC | |
1130 | + | else if ((rarityThresholds[idxThresholdU] > totalBonus)) | |
1131 | + | then idxRarityU | |
1132 | + | else throw((("You can advance only one level of rarity, max total bonus " + toString(rarityThresholds[idxThresholdU])) + "%")) | |
1133 | + | else if ((rarityIdx == idxRarityU)) | |
1134 | + | then if ((rarityThresholds[idxThresholdU] > totalBonus)) | |
1135 | + | then idxRarityU | |
1136 | + | else if ((rarityThresholds[idxThresholdL] > totalBonus)) | |
1137 | + | then idxRarityL | |
1138 | + | else throw((("You can advance only one level of rarity, max total bonus " + toString(rarityThresholds[idxThresholdL])) + "%")) | |
1139 | + | else if ((rarityIdx == idxRarityL)) | |
1140 | + | then if ((rarityThresholds[idxThresholdL] > totalBonus)) | |
1141 | + | then idxRarityL | |
1142 | + | else idxRarityE | |
1143 | + | else if ((rarityIdx == idxRarityE)) | |
1144 | + | then idxRarityE | |
1145 | + | else if ((rarityIdx == idxRarityP)) | |
1146 | + | then throw("You can't exchange NFTs of this rarity") | |
1147 | + | else throw("Unknown rarity") | |
1148 | + | let minWlgFee = fraction(totalBonus, MULT14, getWlgPrice(0)) | |
1149 | + | let change = (wlgFee - minWlgFee) | |
1170 | 1150 | let forTeam = (minWlgFee / 2) | |
1171 | 1151 | let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [(minWlgFee - forTeam)], nil)) | |
1172 | 1152 | if ((0 > change)) | |
1173 | 1153 | then throw((("You need to attach " + fixedPoint(minWlgFee, 8)) + " WLGOLD as fee")) | |
1174 | 1154 | else { | |
1175 | 1155 | let changeActions = if ((change > 0)) | |
1176 | 1156 | then [ScriptTransfer(i.caller, change, wlgAssetId)] | |
1177 | 1157 | else nil | |
1178 | - | let addr = toString(i.caller) | |
1179 | - | let finishKey = keyCommit(addr) | |
1180 | - | let finishBlock = valueOrErrorMessage(getInteger(finishKey), "You have to commitForRandom() first!") | |
1181 | - | if ((finishBlock > height)) | |
1182 | - | then throw(("Random number is not ready yet, wait until height = " + toString(finishBlock))) | |
1183 | - | else { | |
1184 | - | let entropy = value(value(blockInfoByHeight(finishBlock)).vrf) | |
1185 | - | let salt = fromBase58String(split(valueOrElse(getString(keyCurWeekTxIdByUser(addr)), "42_DEFAULT"), "_")[1]) | |
1186 | - | let rand = getRandomNumber(100, salt, entropy) | |
1187 | - | let $t03283933111 = if ((84 > rand)) | |
1188 | - | then $Tuple2(1, idxRarityC) | |
1189 | - | else if ((98 > rand)) | |
1190 | - | then $Tuple2(5, idxRarityU) | |
1191 | - | else $Tuple2(10, idxRarityL) | |
1192 | - | let bonus = $t03283933111._1 | |
1193 | - | let rarityIdx = $t03283933111._2 | |
1194 | - | let $t03311433264 = issueNftCustom(idxNamePickaxe, rarityIdx, idxCollDig, rarityIdx, bonus, idxDescrPickaxe, idxBonusTypeFp, i.caller) | |
1195 | - | let issueNftActions = $t03311433264._1 | |
1196 | - | let nftAssetId = $t03311433264._2 | |
1197 | - | $Tuple2(((((issueNftActions ++ prologActions) ++ changeActions) :+ ScriptTransfer(addressFromStringValue(getStringValue(wlgContract, teamAddrKey)), forTeam, wlgAssetId)) :+ DeleteEntry(finishKey)), $Tuple2(nftAssetId, wlgRemain)) | |
1198 | - | } | |
1158 | + | let $t03103431195 = issueNftCustom(idxNamePickaxe, newRarityIdx, idxCollDig, newRarityIdx, totalBonus, idxDescrPickaxe, idxBonusTypeFp, i.caller) | |
1159 | + | let issueNftActions = $t03103431195._1 | |
1160 | + | let nftAssetId = $t03103431195._2 | |
1161 | + | let burned = size(burnActions) | |
1162 | + | let burnCounterActions = if ((burned == 0)) | |
1163 | + | then nil | |
1164 | + | else [IntegerEntry(keyNftTotalBurned, (valueOrElse(getInteger(keyNftTotalBurned), 0) + burned))] | |
1165 | + | $Tuple2((((((issueNftActions ++ burnActions) ++ burnCounterActions) ++ prologActions) ++ changeActions) :+ ScriptTransfer(addressFromStringValue(getStringValue(wlgContract, teamAddrKey)), forTeam, wlgAssetId)), $Tuple2(nftAssetId, wlgRemain)) | |
1199 | 1166 | } | |
1200 | 1167 | } | |
1201 | - | } | |
1202 | - | } | |
1168 | + | } | |
1203 | 1169 | ||
1204 | 1170 | ||
1205 | 1171 | ||
1206 | 1172 | @Callable(i) | |
1207 | - | func commitForRandom () = { | |
1208 | - | let prologActions = prolog(i) | |
1209 | - | let addr = toString(i.caller) | |
1210 | - | let finishKey = keyCommit(addr) | |
1211 | - | if (isDefined(getInteger(finishKey))) | |
1212 | - | then throw("You already commited for random, please use it") | |
1213 | - | else { | |
1214 | - | let finishBlock = (height + RANDOM_DELAY) | |
1215 | - | $Tuple2(([IntegerEntry(finishKey, finishBlock)] ++ prologActions), finishBlock) | |
1216 | - | } | |
1217 | - | } | |
1173 | + | func openNftChest () = if ((i.caller != this)) | |
1174 | + | then throw("Temporary disabled") | |
1175 | + | else { | |
1176 | + | let prologActions = prolog(i) | |
1177 | + | if ((size(i.payments) != 1)) | |
1178 | + | then throw("exactly 1 payment must be attached") | |
1179 | + | else { | |
1180 | + | let pmt = i.payments[0] | |
1181 | + | let wlgAmount = pmt.amount | |
1182 | + | if (if (!(isDefined(pmt.assetId))) | |
1183 | + | then true | |
1184 | + | else (value(pmt.assetId) != wlgAssetId)) | |
1185 | + | then throw("WLGOLD payments only!") | |
1186 | + | else { | |
1187 | + | let minWlgFee = fraction(NFT_CHEST_PRICE_USDT, MULT8, getWlgPrice(0)) | |
1188 | + | let change = (wlgAmount - minWlgFee) | |
1189 | + | let forTeam = (minWlgFee / 2) | |
1190 | + | let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [(minWlgFee - forTeam)], nil)) | |
1191 | + | if ((0 > change)) | |
1192 | + | then throw((("You need to attach " + fixedPoint(minWlgFee, 8)) + " WLGOLD as fee")) | |
1193 | + | else { | |
1194 | + | let changeActions = if ((change > 0)) | |
1195 | + | then [ScriptTransfer(i.caller, change, wlgAssetId)] | |
1196 | + | else nil | |
1197 | + | let addr = toString(i.caller) | |
1198 | + | let finishKey = keyCommit(addr) | |
1199 | + | let finishBlock = valueOrErrorMessage(getInteger(finishKey), "You have to commitForRandom() first!") | |
1200 | + | if ((finishBlock > height)) | |
1201 | + | then throw(("Random number is not ready yet, wait until height = " + toString(finishBlock))) | |
1202 | + | else { | |
1203 | + | let entropy = value(value(blockInfoByHeight(finishBlock)).vrf) | |
1204 | + | let salt = fromBase58String(split(valueOrElse(getString(keyCurWeekTxIdByUser(addr)), "42_DEFAULT"), "_")[1]) | |
1205 | + | let rand = getRandomNumber(100, salt, entropy) | |
1206 | + | let $t03327633548 = if ((84 > rand)) | |
1207 | + | then $Tuple2(1, idxRarityC) | |
1208 | + | else if ((98 > rand)) | |
1209 | + | then $Tuple2(5, idxRarityU) | |
1210 | + | else $Tuple2(10, idxRarityL) | |
1211 | + | let bonus = $t03327633548._1 | |
1212 | + | let rarityIdx = $t03327633548._2 | |
1213 | + | let $t03355133701 = issueNftCustom(idxNamePickaxe, rarityIdx, idxCollDig, rarityIdx, bonus, idxDescrPickaxe, idxBonusTypeFp, i.caller) | |
1214 | + | let issueNftActions = $t03355133701._1 | |
1215 | + | let nftAssetId = $t03355133701._2 | |
1216 | + | $Tuple2(((((issueNftActions ++ prologActions) ++ changeActions) :+ ScriptTransfer(addressFromStringValue(getStringValue(wlgContract, teamAddrKey)), forTeam, wlgAssetId)) :+ DeleteEntry(finishKey)), $Tuple2(nftAssetId, wlgRemain)) | |
1217 | + | } | |
1218 | + | } | |
1219 | + | } | |
1220 | + | } | |
1221 | + | } | |
1222 | + | ||
1223 | + | ||
1224 | + | ||
1225 | + | @Callable(i) | |
1226 | + | func commitForRandom () = if ((i.caller != this)) | |
1227 | + | then throw("Temporary disabled") | |
1228 | + | else { | |
1229 | + | let prologActions = prolog(i) | |
1230 | + | let addr = toString(i.caller) | |
1231 | + | let finishKey = keyCommit(addr) | |
1232 | + | if (isDefined(getInteger(finishKey))) | |
1233 | + | then throw("You already commited for random, please use it") | |
1234 | + | else { | |
1235 | + | let finishBlock = (height + RANDOM_DELAY) | |
1236 | + | $Tuple2(([IntegerEntry(finishKey, finishBlock)] ++ prologActions), finishBlock) | |
1237 | + | } | |
1238 | + | } | |
1218 | 1239 | ||
1219 | 1240 | ||
1220 | 1241 | ||
1221 | 1242 | @Callable(i) | |
1222 | 1243 | func drawDaylyPromo () = if ((i.caller != this)) | |
1223 | 1244 | then throw("Permission denied") | |
1224 | 1245 | else { | |
1225 | 1246 | let today = (height / DAY_BLOCKS) | |
1226 | 1247 | let maxValue = valueOrElse(getInteger(keyTotalPromoTickets), 0) | |
1227 | 1248 | if ((maxValue == 0)) | |
1228 | 1249 | then throw("No tickets to draw") | |
1229 | 1250 | else { | |
1230 | 1251 | let b = (today * DAY_BLOCKS) | |
1231 | 1252 | let h = if ((b > VRF_OFFSET)) | |
1232 | 1253 | then b | |
1233 | 1254 | else (b + VRF_OFFSET) | |
1234 | 1255 | let entropy = value(value(blockInfoByHeight(h)).vrf) | |
1235 | 1256 | let promoMap = valueOrElse(getString(keyPromoMap), "") | |
1236 | 1257 | if ((promoMap == "")) | |
1237 | 1258 | then throw("No participants") | |
1238 | 1259 | else { | |
1239 | 1260 | func singleDraw (ac,j) = if ((j >= promoNumPrizes)) | |
1240 | 1261 | then ac | |
1241 | 1262 | else { | |
1242 | 1263 | let rand = getRandomNumber(ac._1, ac._2, entropy) | |
1243 | 1264 | let promoList = if ((ac._3 == "")) | |
1244 | 1265 | then nil | |
1245 | 1266 | else split_51C(ac._3, "_") | |
1246 | 1267 | func countTickets (acc,el) = { | |
1247 | 1268 | let parts = split(el, ":") | |
1248 | 1269 | let addr = parts[0] | |
1249 | 1270 | let tickets = parseIntValue(parts[1]) | |
1250 | 1271 | let newTotal = (acc._1 + tickets) | |
1251 | 1272 | if (if ((acc._3 == "")) | |
1252 | 1273 | then (newTotal > rand) | |
1253 | 1274 | else false) | |
1254 | 1275 | then $Tuple3(newTotal, tickets, addr) | |
1255 | 1276 | else $Tuple3(newTotal, acc._2, acc._3) | |
1256 | 1277 | } | |
1257 | 1278 | ||
1258 | 1279 | let r = { | |
1259 | 1280 | let $l = promoList | |
1260 | 1281 | let $s = size($l) | |
1261 | 1282 | let $acc0 = $Tuple3(0, 0, "") | |
1262 | 1283 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1263 | 1284 | then $a | |
1264 | 1285 | else countTickets($a, $l[$i]) | |
1265 | 1286 | ||
1266 | 1287 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1267 | 1288 | then $a | |
1268 | 1289 | else throw("List size exceeds 200") | |
1269 | 1290 | ||
1270 | 1291 | $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($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($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($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($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($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($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($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($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($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($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($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100), 101), 102), 103), 104), 105), 106), 107), 108), 109), 110), 111), 112), 113), 114), 115), 116), 117), 118), 119), 120), 121), 122), 123), 124), 125), 126), 127), 128), 129), 130), 131), 132), 133), 134), 135), 136), 137), 138), 139), 140), 141), 142), 143), 144), 145), 146), 147), 148), 149), 150), 151), 152), 153), 154), 155), 156), 157), 158), 159), 160), 161), 162), 163), 164), 165), 166), 167), 168), 169), 170), 171), 172), 173), 174), 175), 176), 177), 178), 179), 180), 181), 182), 183), 184), 185), 186), 187), 188), 189), 190), 191), 192), 193), 194), 195), 196), 197), 198), 199), 200) | |
1271 | 1292 | } | |
1272 | 1293 | let winner = r._3 | |
1273 | 1294 | if ((winner == "")) | |
1274 | 1295 | then ac | |
1275 | 1296 | else { | |
1276 | 1297 | let mapParts = split_51C(ac._3, winner) | |
1277 | 1298 | let newMap = if ((mapParts[0] == "")) | |
1278 | 1299 | then drop(mapParts[1], 5) | |
1279 | 1300 | else (dropRight(mapParts[0], 1) + drop(mapParts[1], 4)) | |
1280 | - | let stakeActions = invoke(this, "stakeAcresFor", [winner, promoAwardPerRound[j], true], nil) | |
1281 | - | if ((stakeActions == stakeActions)) | |
1301 | + | let winActions = if ((j == 0)) | |
1302 | + | then invoke(this, "issueMittenP", [winner], nil) | |
1303 | + | else invoke(this, "stakeAcresFor", [winner, promoAwardPerRound[j], true], nil) | |
1304 | + | if ((winActions == winActions)) | |
1282 | 1305 | then { | |
1283 | 1306 | let newSalt = fromBase58String(split(valueOrElse(getString(keyCurWeekTxIdByUser(winner)), "0_DEFAULT"), "_")[1]) | |
1284 | 1307 | $Tuple4((ac._1 - r._2), newSalt, newMap, (ac._4 :+ winner)) | |
1285 | 1308 | } | |
1286 | 1309 | else throw("Strict value is not equal to itself.") | |
1287 | 1310 | } | |
1288 | 1311 | } | |
1289 | 1312 | ||
1290 | 1313 | let draws = { | |
1291 | - | let $l = [0, 1, 2] | |
1314 | + | let $l = [0, 1, 2, 3, 4, 5] | |
1292 | 1315 | let $s = size($l) | |
1293 | 1316 | let $acc0 = $Tuple4(maxValue, i.transactionId, promoMap, nil) | |
1294 | 1317 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1295 | 1318 | then $a | |
1296 | 1319 | else singleDraw($a, $l[$i]) | |
1297 | 1320 | ||
1298 | 1321 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1299 | 1322 | then $a | |
1300 | - | else throw("List size exceeds | |
1323 | + | else throw("List size exceeds 6") | |
1301 | 1324 | ||
1302 | - | $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3) | |
1325 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
1303 | 1326 | } | |
1304 | 1327 | $Tuple2([StringEntry(keyPromoMap, draws._3), IntegerEntry(keyTotalPromoTickets, draws._1), StringEntry(keyDailyWinners(today), makeString(draws._4, "_"))], 0) | |
1305 | 1328 | } | |
1306 | 1329 | } | |
1307 | 1330 | } | |
1308 | 1331 | ||
1309 | 1332 |
github/deemru/w8io/169f3d6 179.49 ms ◑