tx · Zk8XVMXX2T4gnc1TS89DCtaVdPYNeAdvdfDtTJBfRyu 3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh: -0.02700000 Waves 2024.11.26 20:09 [3388666] smart account 3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh > SELF 0.00000000 Waves
{ "type": 13, "id": "Zk8XVMXX2T4gnc1TS89DCtaVdPYNeAdvdfDtTJBfRyu", "fee": 2700000, "feeAssetId": null, "timestamp": 1732641023621, "version": 2, "chainId": 84, "sender": "3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh", "senderPublicKey": "3QtfC1XbLZXdeawMDeSERy9vvjUmj1XYd2GFmrvx7pWQ", "proofs": [ "2YThhuY4boZbh8tnXqqiSSrNU3VSeXxvSTpgGCnrf4yUV2KQYLpvBHJqz9v6yRwzsxhTKHmoESY5nhNBpH8GXdx6" ], "script": "base64:BgJGCAISABIECgIICBIDCgEEEgMKAQESABIAEgMKAQESABIECgIIARIAEgMKAQgSAwoBCBIECgIIARIECgIIARIAEgMKAQgSAFoAA1NFUAICX18ABU1VTFQ2AMCEPQAFTVVMVDcAgK3iBAAFTVVMVDgAgMLXLwAKREFZX01JTExJUwCAuJkpABVVU0RUMkFDUkVTX01VTFRJUExJRVIACgATT05FX1BFUkNFTlRfRElWSVNPUgBkAAVjaGFpbgkAyQECCQDKAQIIBQR0aGlzBWJ5dGVzAAEAAQALV0VFS19CTE9DS1MEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDAA4E4DCQAAAgEBVAUHJG1hdGNoMAC0AQkAAgECDVVua25vd24gY2hhaW4AC3VzZHRBc3NldElkBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwASCE2nqyCAM/TtG7yo7ui5O8yYLdC136B5ao1CP5qA//uQMJAAACAQFUBQckbWF0Y2gwASBVsdifcoeC7+XjW42sBatl3ppDoS8WuwXzGreHpfHFGAkAAgECDVVua25vd24gY2hhaW4AFmRlZm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1MTczCQEQaXNzdWVORlRpbnRlcm5hbAIFCG5mdEluZGV4CAUBaQZjYWxsZXIECm5mdEFjdGlvbnMIBQ0kdDAyNTEwNjI1MTczAl8xBApuZnRBc3NldElkCAUNJHQwMjUxMDYyNTE3MwJfMgkAlAoCCQDNCAIJAM4IAgkAzggCCQDOCAIFCm5mdEFjdGlvbnMFC2J1cm5BY3Rpb25zBQ1wcm9sb2dBY3Rpb25zBQ1jaGFuZ2VBY3Rpb25zCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIAAQUKbmZ0QXNzZXRJZAUKbmZ0QXNzZXRJZACeqF7h", "height": 3388666, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2C6DWP1ZvbN5KeNym6RcL48zZpGVBp7DutgdY6PzTHk9 Next: FWNooDxrfSJk7KEin1oH5RYHccUKiimv4XXtUK3d3Jkg Diff:
Old | New | Differences | |
---|---|---|---|
254 | 254 | ||
255 | 255 | let keyLastLimitLeft = "lastLimitLeft" | |
256 | 256 | ||
257 | - | let nftDescriptions = [", \"collection\": \"Digging tools\", \"name\": \"Gold shovel\", \"description\": \"Reward for early birds\", \"rare\": \"Promo\", \"bonus\": 3, \"bonusType\": \"FarmPower\"}", ", \"collection\": \"Digging tools\", \"name\": \"Pickaxe\", \"description\": \"Increases FarmPower\", \"rare\": \"Common\", \"bonus\": 1, \"bonusType\": \"FarmPower\"}"] | |
257 | + | let nftDescriptions = [", \"collection\": \"Digging tools\", \"name\": \"Gold shovel\", \"description\": \"Reward for early birds\", \"rare\": \"Promo\", \"bonus\": 3, \"bonusType\": \"FarmPower\"}", ", \"collection\": \"Digging tools\", \"name\": \"Pickaxe\", \"description\": \"Increases FarmPower\", \"rare\": \"Common\", \"bonus\": 1, \"bonusType\": \"FarmPower\"}", ", \"collection\": \"Digging tools\", \"name\": \"Pickaxe\", \"description\": \"Increases FarmPower\", \"rare\": \"Common\", \"bonus\": 3, \"bonusType\": \"FarmPower\"}", ", \"collection\": \"Digging tools\", \"name\": \"Pickaxe\", \"description\": \"Increases FarmPower\", \"rare\": \"Common\", \"bonus\": 5, \"bonusType\": \"FarmPower\"}", ", \"collection\": \"Digging tools\", \"name\": \"Pickaxe\", \"description\": \"Increases FarmPower\", \"rare\": \"Common\", \"bonus\": 10, \"bonusType\": \"FarmPower\"}"] | |
258 | 258 | ||
259 | - | let nftNames = ["SHOVEL-P3", "PICKAXE-C1"] | |
259 | + | let nftNames = ["SHOVEL-P3", "PICKAXE-C1", "PICKAXE-C3", "PICKAXE-C5", "PICKAXE-C10"] | |
260 | 260 | ||
261 | - | let contentKeys = ["contentShovelP3", "contentPickaxeC1"] | |
261 | + | let contentKeys = ["contentShovelP3", "contentPickaxeC1", "contentPickaxeC3", "contentPickaxeC5", "contentPickaxeC10"] | |
262 | 262 | ||
263 | 263 | let URL = "\"url\": \"https://waveslands.com\", " | |
264 | 264 | ||
329 | 329 | else false) | |
330 | 330 | then throw((((("You have only " + fixedPoint(oldBonus, 4)) + "% bonus, and tried to unstake ") + fixedPoint(-(bonusDelta), 4)) + "%")) | |
331 | 331 | else { | |
332 | - | let $ | |
333 | - | let newBonusedFp = $ | |
334 | - | let ignored = $ | |
332 | + | let $t059586057 = getFarmingPowerByAcresAndBonus(newAcresAmount, (oldBonus + bonusDelta)) | |
333 | + | let newBonusedFp = $t059586057._1 | |
334 | + | let ignored = $t059586057._2 | |
335 | 335 | let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0) | |
336 | 336 | let acresActions = if ((amt == 0)) | |
337 | 337 | then nil | |
413 | 413 | ||
414 | 414 | ||
415 | 415 | func bonusByDescription (descr) = if (!(contains(descr, "\"bonusType\": \"FarmPower\""))) | |
416 | - | then throw("NFT is not supported | |
416 | + | then throw(("NFT is not supported: " + descr)) | |
417 | 417 | else { | |
418 | 418 | let bonusStr = split_4C(split_4C(descr, "\"bonus\":")[1], ",")[0] | |
419 | - | | |
419 | + | parseIntValue(drop(bonusStr, (valueOrElse(lastIndexOf(bonusStr, " "), -1) + 1))) | |
420 | 420 | } | |
421 | 421 | ||
422 | 422 | ||
458 | 458 | if ((arbReleaseTime > lastBlock.timestamp)) | |
459 | 459 | then throw(("You traded some WLGOLD, cannot unstake until " + toString(arbReleaseTime))) | |
460 | 460 | else { | |
461 | - | let $ | |
462 | - | let actions = $ | |
463 | - | let wlgClaimedAmount = $ | |
461 | + | let $t01155211632 = stakeUnstakeAcresInternal(-(amount), address, 0) | |
462 | + | let actions = $t01155211632._1 | |
463 | + | let wlgClaimedAmount = $t01155211632._2 | |
464 | 464 | $Tuple2(((actions :+ ScriptTransfer(i.caller, amount, acresAssetId)) ++ prologActions), wlgClaimedAmount) | |
465 | 465 | } | |
466 | 466 | } | |
483 | 483 | else (value(pmt.assetId) != acresAssetId)) | |
484 | 484 | then throw("ACRES payments only!") | |
485 | 485 | else { | |
486 | - | let $ | |
487 | - | let actions = $ | |
488 | - | let wlgClaimedAmount = $ | |
486 | + | let $t01208312159 = stakeUnstakeAcresInternal(amt, address, 0) | |
487 | + | let actions = $t01208312159._1 | |
488 | + | let wlgClaimedAmount = $t01208312159._2 | |
489 | 489 | $Tuple2((actions ++ prologActions), wlgClaimedAmount) | |
490 | 490 | } | |
491 | 491 | } | |
549 | 549 | then throw((("Min payment should be " + fixedPoint(MULT7, 8)) + " ACRES")) | |
550 | 550 | else { | |
551 | 551 | let addr = toString(i.caller) | |
552 | - | let $ | |
553 | - | let limitAction = $ | |
554 | - | let maxUsdt = $ | |
552 | + | let $t01401614064 = getSwapLimitAcres() | |
553 | + | let limitAction = $t01401614064._1 | |
554 | + | let maxUsdt = $t01401614064._2 | |
555 | 555 | let maxAcres = (maxUsdt * USDT2ACRES_MULTIPLIER) | |
556 | 556 | if ((acresAmount > maxAcres)) | |
557 | 557 | then throw((("You can sell max " + fixedPoint(maxAcres, 8)) + " ACRES")) | |
567 | 567 | ||
568 | 568 | @Callable(i) | |
569 | 569 | func sellAcresREADONLY (address,acresAmount) = { | |
570 | - | let $ | |
571 | - | let limitAction = $ | |
572 | - | let maxUsdt = $ | |
570 | + | let $t01456014608 = getSwapLimitAcres() | |
571 | + | let limitAction = $t01456014608._1 | |
572 | + | let maxUsdt = $t01456014608._2 | |
573 | 573 | let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2) | |
574 | 574 | $Tuple2(nil, [usdtAmount, MULT7, (maxUsdt * USDT2ACRES_MULTIPLIER), 0]) | |
575 | 575 | } | |
621 | 621 | let req = invoke(oldAcresAddress, "requestAcresCallback", [(((rr._1 + rr._2) + rr._3) + rr._4)], nil) | |
622 | 622 | if ((req == req)) | |
623 | 623 | then { | |
624 | - | let $ | |
625 | - | let nftActions = $ | |
626 | - | let nftAssetId = $ | |
624 | + | let $t01648016560 = issueNFTinternal(IdxDtx3PercConversion, i.caller) | |
625 | + | let nftActions = $t01648016560._1 | |
626 | + | let nftAssetId = $t01648016560._2 | |
627 | 627 | $Tuple5(rr._1, rr._2, rr._3, rr._4, nftActions) | |
628 | 628 | } | |
629 | 629 | else throw("Strict value is not equal to itself.") | |
690 | 690 | let userFpKey = keyFarmingPowerByUser(address) | |
691 | 691 | let oldFp = valueOrElse(getInteger(userFpKey), 0) | |
692 | 692 | let userBonus = valueOrElse(getInteger(acres2Contract, keyUserFullBonus(address)), 0) | |
693 | - | let $ | |
694 | - | let newBonusedFp = $ | |
695 | - | let ignored = $ | |
693 | + | let $t01872518812 = getFarmingPowerByAcresAndBonus(newAcresAmount, userBonus) | |
694 | + | let newBonusedFp = $t01872518812._1 | |
695 | + | let ignored = $t01872518812._2 | |
696 | 696 | let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0) | |
697 | 697 | let newTotalFp = ((oldTotalFp + newBonusedFp) - oldFp) | |
698 | 698 | $Tuple2(nil, [oldFp, newBonusedFp, oldTotalFp, newTotalFp]) | |
727 | 727 | then split_4C(value(nftsStr), "_") | |
728 | 728 | else nil | |
729 | 729 | if (containsElement(nfts, assetIdStr)) | |
730 | - | then throw(("Your staked | |
730 | + | then throw(("Your staked NFTs already contain " + assetIdStr)) | |
731 | 731 | else if ((size(nfts) >= MAX_NFTS_STAKED_BY_USER)) | |
732 | 732 | then throw((("Your already staked max (" + toString(MAX_NFTS_STAKED_BY_USER)) + ") NFTs")) | |
733 | 733 | else { | |
739 | 739 | if ((wlNftNumber >= MAX_WL_NFTS)) | |
740 | 740 | then throw((("You can stake max " + toString(MAX_WL_NFTS)) + " of WavesLands NFTs")) | |
741 | 741 | else { | |
742 | - | let bonusVal = bonusByDescription(value(asset.description)) | |
743 | - | let $ | |
744 | - | let actions = $ | |
745 | - | let wlgClaimedAmount = $ | |
742 | + | let bonusVal = (bonusByDescription(value(asset.description)) * 10000) | |
743 | + | let $t02058720665 = stakeUnstakeAcresInternal(0, addr, bonusVal) | |
744 | + | let actions = $t02058720665._1 | |
745 | + | let wlgClaimedAmount = $t02058720665._2 | |
746 | 746 | $Tuple2(((((actions :+ listAction) :+ IntegerEntry(keyUserWlNftNumber(addr), (wlNftNumber + 1))) :+ IntegerEntry(keyStakedTimeByAssetIdAndOwner(assetIdStr, addr), lastBlock.timestamp)) ++ prologActions), wlgClaimedAmount) | |
747 | 747 | } | |
748 | 748 | } | |
755 | 755 | if ((arkNftNumber >= MAX_ARK_NFTS)) | |
756 | 756 | then throw((("You can stake max " + toString(MAX_ARK_NFTS)) + " of Arkimals NFTs")) | |
757 | 757 | else { | |
758 | - | let $ | |
759 | - | let actions = $ | |
760 | - | let wlgClaimedAmount = $ | |
758 | + | let $t02130721390 = stakeUnstakeAcresInternal(0, addr, ARK_NFT_BONUS) | |
759 | + | let actions = $t02130721390._1 | |
760 | + | let wlgClaimedAmount = $t02130721390._2 | |
761 | 761 | $Tuple2(((((actions :+ listAction) :+ IntegerEntry(keyUserArkNftNumber(addr), (arkNftNumber + 1))) :+ IntegerEntry(keyStakedTimeByAssetIdAndOwner(assetIdStr, addr), lastBlock.timestamp)) ++ prologActions), wlgClaimedAmount) | |
762 | 762 | } | |
763 | 763 | } | |
796 | 796 | then { | |
797 | 797 | let wlNftNumber = valueOrElse(getInteger(keyUserWlNftNumber(addr)), 0) | |
798 | 798 | let bonusVal = bonusByDescription(value(asset.description)) | |
799 | - | let $ | |
800 | - | let actions = $ | |
801 | - | let wlgClaimedAmount = $ | |
799 | + | let $t02270322782 = stakeUnstakeAcresInternal(0, addr, -(bonusVal)) | |
800 | + | let actions = $t02270322782._1 | |
801 | + | let wlgClaimedAmount = $t02270322782._2 | |
802 | 802 | $Tuple2((((((actions :+ listAction) :+ IntegerEntry(keyUserWlNftNumber(addr), (wlNftNumber - 1))) :+ DeleteEntry(keyStakedTimeByAssetIdAndOwner(toBase58String(assetId), addr))) :+ ScriptTransfer(i.caller, 1, assetId)) ++ prologActions), wlgClaimedAmount) | |
803 | 803 | } | |
804 | 804 | else { | |
807 | 807 | then throw("Only WavesLands and Arkimals NFT tokens are accepted") | |
808 | 808 | else { | |
809 | 809 | let arkNftNumber = valueOrElse(getInteger(keyUserArkNftNumber(addr)), 0) | |
810 | - | let $ | |
811 | - | let actions = $ | |
812 | - | let wlgClaimedAmount = $ | |
810 | + | let $t02333923423 = stakeUnstakeAcresInternal(0, addr, -(ARK_NFT_BONUS)) | |
811 | + | let actions = $t02333923423._1 | |
812 | + | let wlgClaimedAmount = $t02333923423._2 | |
813 | 813 | $Tuple2((((((actions :+ listAction) :+ IntegerEntry(keyUserArkNftNumber(addr), (arkNftNumber - 1))) :+ DeleteEntry(keyStakedTimeByAssetIdAndOwner(toBase58String(assetId), addr))) :+ ScriptTransfer(i.caller, 1, assetId)) ++ prologActions), wlgClaimedAmount) | |
814 | 814 | } | |
815 | 815 | } | |
819 | 819 | } | |
820 | 820 | ||
821 | 821 | ||
822 | + | ||
823 | + | @Callable(i) | |
824 | + | func exchangeNFTs () = { | |
825 | + | let prologActions = prolog(i) | |
826 | + | if ((3 > size(i.payments))) | |
827 | + | then throw("Min one USDT and 2 NFT payments allowed") | |
828 | + | else if ((size(i.payments) > 6)) | |
829 | + | then throw("Max one USDT and 5 NFT payments allowed") | |
830 | + | else { | |
831 | + | let addr = toString(i.caller) | |
832 | + | func addUp (acc,pmt) = { | |
833 | + | let assetId = valueOrErrorMessage(pmt.assetId, "WAVES payments not allowed") | |
834 | + | if ((assetId == usdtAssetId)) | |
835 | + | then $Tuple3((acc._1 + pmt.amount), acc._2, acc._3) | |
836 | + | else { | |
837 | + | let asset = value(assetInfo(assetId)) | |
838 | + | if ((asset.issuer != this)) | |
839 | + | then throw("Only WL-issued NFTs allowed") | |
840 | + | else { | |
841 | + | let bonusPerc = bonusByDescription(value(asset.description)) | |
842 | + | $Tuple3(acc._1, (acc._2 + bonusPerc), (acc._3 :+ Burn(assetId, 1))) | |
843 | + | } | |
844 | + | } | |
845 | + | } | |
846 | + | ||
847 | + | let $t02457124650 = { | |
848 | + | let $l = i.payments | |
849 | + | let $s = size($l) | |
850 | + | let $acc0 = $Tuple3(0, 0, nil) | |
851 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
852 | + | then $a | |
853 | + | else addUp($a, $l[$i]) | |
854 | + | ||
855 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
856 | + | then $a | |
857 | + | else throw("List size exceeds 6") | |
858 | + | ||
859 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
860 | + | } | |
861 | + | let usdtFee = $t02457124650._1 | |
862 | + | let totalBonus = $t02457124650._2 | |
863 | + | let burnActions = $t02457124650._3 | |
864 | + | let nftIndex = if ((totalBonus == 3)) | |
865 | + | then 2 | |
866 | + | else if ((totalBonus == 5)) | |
867 | + | then 3 | |
868 | + | else if ((totalBonus == 10)) | |
869 | + | then 4 | |
870 | + | else throw("Only bonuses of 3%, 5% or 10% are supported") | |
871 | + | let change = ((totalBonus * MULT6) - usdtFee) | |
872 | + | if ((0 > change)) | |
873 | + | then throw((("You need to attach " + fixedPoint(usdtFee, 6)) + "USDT as fee")) | |
874 | + | else { | |
875 | + | let changeActions = if ((change > 0)) | |
876 | + | then [ScriptTransfer(i.caller, change, usdtAssetId)] | |
877 | + | else nil | |
878 | + | let $t02510625173 = issueNFTinternal(nftIndex, i.caller) | |
879 | + | let nftActions = $t02510625173._1 | |
880 | + | let nftAssetId = $t02510625173._2 | |
881 | + | $Tuple2(((((nftActions ++ burnActions) ++ prologActions) ++ changeActions) :+ ScriptTransfer(i.caller, 1, nftAssetId)), nftAssetId) | |
882 | + | } | |
883 | + | } | |
884 | + | } | |
885 | + | ||
886 | + |
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 DAY_MILLIS = 86400000 | |
13 | 13 | ||
14 | 14 | let USDT2ACRES_MULTIPLIER = 10 | |
15 | 15 | ||
16 | 16 | let ONE_PERCENT_DIVISOR = 100 | |
17 | 17 | ||
18 | 18 | let chain = take(drop(this.bytes, 1), 1) | |
19 | 19 | ||
20 | 20 | let WEEK_BLOCKS = match chain { | |
21 | 21 | case _ => | |
22 | 22 | if ((base58'2W' == $match0)) | |
23 | 23 | then 10080 | |
24 | 24 | else if ((base58'2T' == $match0)) | |
25 | 25 | then 180 | |
26 | 26 | else throw("Unknown chain") | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | let usdtAssetId = match chain { | |
30 | 30 | case _ => | |
31 | 31 | if ((base58'2W' == $match0)) | |
32 | 32 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
33 | 33 | else if ((base58'2T' == $match0)) | |
34 | 34 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
35 | 35 | else throw("Unknown chain") | |
36 | 36 | } | |
37 | 37 | ||
38 | 38 | let defaultRest2AddressStr = match chain { | |
39 | 39 | case _ => | |
40 | 40 | if ((base58'2W' == $match0)) | |
41 | 41 | then "3PFwYta8biEz31zpeFe5DJK8wE5trSpQVF8" | |
42 | 42 | else if ((base58'2T' == $match0)) | |
43 | 43 | then "3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv" | |
44 | 44 | else throw("Unknown chain") | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | let arbitrageDelay = match chain { | |
48 | 48 | case _ => | |
49 | 49 | if ((base58'2W' == $match0)) | |
50 | 50 | then DAY_MILLIS | |
51 | 51 | else if ((base58'2T' == $match0)) | |
52 | 52 | then 60000 | |
53 | 53 | else throw("Unknown chain") | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | let oldStakingContractStr = match chain { | |
57 | 57 | case _ => | |
58 | 58 | if ((base58'2W' == $match0)) | |
59 | 59 | then "3PLncXtS1U83D6cQbFD3H8rBHPLgzxSFKZ1" | |
60 | 60 | else if ((base58'2T' == $match0)) | |
61 | 61 | then "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm" | |
62 | 62 | else throw("Unknown chain") | |
63 | 63 | } | |
64 | 64 | ||
65 | 65 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | let IdxCfgAcres2Dapp = 1 | |
69 | 69 | ||
70 | 70 | let IdxCfgWlgDapp = 2 | |
71 | 71 | ||
72 | 72 | let IdxCfgInvestFundDapp = 5 | |
73 | 73 | ||
74 | 74 | func keyRestCfg () = "%s__restConfig" | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func keyRest2Address () = "%s__rest2Addr" | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func getContractAddressOrFail (rest2Cfg,idx) = valueOrErrorMessage(addressFromString(rest2Cfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | let rest2Contract = addressFromStringValue(valueOrElse(getString(this, keyRest2Address()), defaultRest2AddressStr)) | |
87 | 87 | ||
88 | 88 | let rest2Cfg = readRestCfgOrFail(rest2Contract) | |
89 | 89 | ||
90 | 90 | let acres2Contract = getContractAddressOrFail(rest2Cfg, IdxCfgAcres2Dapp) | |
91 | 91 | ||
92 | 92 | let wlgContract = getContractAddressOrFail(rest2Cfg, IdxCfgWlgDapp) | |
93 | 93 | ||
94 | 94 | let investFundContract = getContractAddressOrFail(rest2Cfg, IdxCfgInvestFundDapp) | |
95 | 95 | ||
96 | 96 | let oldAcresContractKey = "oldAcresContract" | |
97 | 97 | ||
98 | 98 | func keyBlocked () = "contractsBlocked" | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func keyLastWeekTxIdByUser (addr) = ("lastWeekTxIdByUser_" + addr) | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func keyCurWeekTxIdByUser (addr) = ("curWeekTxIdByUser_" + addr) | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | let acresIssuedAmountKey = "acresIssuedAmount" | |
108 | 108 | ||
109 | 109 | let acresAssetIdKey = "acresAssetId" | |
110 | 110 | ||
111 | 111 | let acresAssetId = valueOrErrorMessage(getBinary(acres2Contract, acresAssetIdKey), "ACRES is not issued yet") | |
112 | 112 | ||
113 | 113 | func keyAcresStakedTimeByUser (addr) = ("acresStakedTimeByUser_" + addr) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func keyStakedLandsByOwner (ownerAddr) = ("stakedLandsByOwner_" + ownerAddr) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func keyStakedTimeByAssetIdAndOwner (assetId,addr) = ((("st_" + assetId) + "_") + addr) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func keyStakedNFTsByOwner (ownerAddr) = ("stakedNFTsByOwner_" + ownerAddr) | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func asInt (v) = match v { | |
129 | 129 | case n: Int => | |
130 | 130 | n | |
131 | 131 | case _ => | |
132 | 132 | throw("fail to cast into Int") | |
133 | 133 | } | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func asTuple5Ints (val) = match val { | |
137 | 137 | case t: (Int, Int, Int, Int, Int) => | |
138 | 138 | t | |
139 | 139 | case _ => | |
140 | 140 | throw("fail to cast into (Int, Int, Int, Int, Int)") | |
141 | 141 | } | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func asTuple4Ints (val) = match val { | |
145 | 145 | case t: (Int, Int, Int, Int) => | |
146 | 146 | t | |
147 | 147 | case _ => | |
148 | 148 | throw("fail to cast into (Int, Int, Int, Int)") | |
149 | 149 | } | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func asTuple3Ints (val) = match val { | |
153 | 153 | case t: (Int, Int, Int) => | |
154 | 154 | t | |
155 | 155 | case _ => | |
156 | 156 | throw("fail to cast into (Int, Int, Int)") | |
157 | 157 | } | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func asTuple2Ints (val) = match val { | |
161 | 161 | case t: (Int, Int) => | |
162 | 162 | t | |
163 | 163 | case _ => | |
164 | 164 | throw("fail to cast into (Int, Int)") | |
165 | 165 | } | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func fixedPoint (val,decimals) = { | |
169 | 169 | let tenPow = pow(10, 0, decimals, 0, 0, DOWN) | |
170 | 170 | let lowPart = toString((val % tenPow)) | |
171 | 171 | let zeroes = drop(toString(tenPow), (1 + size(lowPart))) | |
172 | 172 | (((toString((val / tenPow)) + ".") + zeroes) + lowPart) | |
173 | 173 | } | |
174 | 174 | ||
175 | 175 | ||
176 | 176 | let M6_ = 1000000 | |
177 | 177 | ||
178 | 178 | let M8_ = 100000000 | |
179 | 179 | ||
180 | 180 | let wlgIssuedAmtKey = "wlg_issuedAmount" | |
181 | 181 | ||
182 | 182 | let zbIssuedAmtKey = "zbill_issuedAmount" | |
183 | 183 | ||
184 | 184 | func keyAcresStakedAmtByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | func keyFarmingPowerByUser (addr) = ("farmingPowerByUser_" + addr) | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | let acresStakdTotalKey = "acresStakedAmountTotal" | |
191 | 191 | ||
192 | 192 | let totalFarmingPowerKey = "totalFarmingPower" | |
193 | 193 | ||
194 | 194 | let IdxDtx3PercConversion = 0 | |
195 | 195 | ||
196 | 196 | let MAX_WL_NFTS = 3 | |
197 | 197 | ||
198 | 198 | let MAX_ARK_NFTS = 1 | |
199 | 199 | ||
200 | 200 | let ARK_NFT_BONUS = 5000 | |
201 | 201 | ||
202 | 202 | let MAX_NFTS_STAKED_BY_USER = 4 | |
203 | 203 | ||
204 | 204 | let keyNftTotalIssued = "nftTotalIssued" | |
205 | 205 | ||
206 | 206 | func keyNftNumberByAssetId (assetId) = ("nftNumberByAssetId_" + assetId) | |
207 | 207 | ||
208 | 208 | ||
209 | 209 | func keyUserWlNftNumber (addr) = ("userWlNftNumber_" + addr) | |
210 | 210 | ||
211 | 211 | ||
212 | 212 | func keyUserArkNftNumber (addr) = ("userArkNftNumber_" + addr) | |
213 | 213 | ||
214 | 214 | ||
215 | 215 | func keyUserFullBonus (addr) = ("userFullBonus_" + addr) | |
216 | 216 | ||
217 | 217 | ||
218 | 218 | let levelAcres = [0, 10, 20, 40, 80, 150, 250, 400, 700, 1000] | |
219 | 219 | ||
220 | 220 | func getLevelByAcres (acres) = { | |
221 | 221 | let acr = ((acres + 99999999) / M8_) | |
222 | 222 | func checker (acc,item) = if ((item >= acr)) | |
223 | 223 | then acc | |
224 | 224 | else (acc + 1) | |
225 | 225 | ||
226 | 226 | let $l = levelAcres | |
227 | 227 | let $s = size($l) | |
228 | 228 | let $acc0 = 0 | |
229 | 229 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
230 | 230 | then $a | |
231 | 231 | else checker($a, $l[$i]) | |
232 | 232 | ||
233 | 233 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
234 | 234 | then $a | |
235 | 235 | else throw("List size exceeds 10") | |
236 | 236 | ||
237 | 237 | $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) | |
238 | 238 | } | |
239 | 239 | ||
240 | 240 | ||
241 | 241 | func getFarmingPowerByAcres (acres) = ((acres * 20) * (getLevelByAcres(acres) + 4)) | |
242 | 242 | ||
243 | 243 | ||
244 | 244 | func getFarmingPowerByAcresAndBonus (acres,bonus6) = { | |
245 | 245 | let notBonused = getFarmingPowerByAcres(acres) | |
246 | 246 | $Tuple2(fraction(notBonused, (M6_ + bonus6), M6_), notBonused) | |
247 | 247 | } | |
248 | 248 | ||
249 | 249 | ||
250 | 250 | func keyLastWlgTradeTimeByUser (addr) = ("lastArbTimeUser_" + addr) | |
251 | 251 | ||
252 | 252 | ||
253 | 253 | let keyLastAcresSellTime = "lastAcresSellTime" | |
254 | 254 | ||
255 | 255 | let keyLastLimitLeft = "lastLimitLeft" | |
256 | 256 | ||
257 | - | let nftDescriptions = [", \"collection\": \"Digging tools\", \"name\": \"Gold shovel\", \"description\": \"Reward for early birds\", \"rare\": \"Promo\", \"bonus\": 3, \"bonusType\": \"FarmPower\"}", ", \"collection\": \"Digging tools\", \"name\": \"Pickaxe\", \"description\": \"Increases FarmPower\", \"rare\": \"Common\", \"bonus\": 1, \"bonusType\": \"FarmPower\"}"] | |
257 | + | let nftDescriptions = [", \"collection\": \"Digging tools\", \"name\": \"Gold shovel\", \"description\": \"Reward for early birds\", \"rare\": \"Promo\", \"bonus\": 3, \"bonusType\": \"FarmPower\"}", ", \"collection\": \"Digging tools\", \"name\": \"Pickaxe\", \"description\": \"Increases FarmPower\", \"rare\": \"Common\", \"bonus\": 1, \"bonusType\": \"FarmPower\"}", ", \"collection\": \"Digging tools\", \"name\": \"Pickaxe\", \"description\": \"Increases FarmPower\", \"rare\": \"Common\", \"bonus\": 3, \"bonusType\": \"FarmPower\"}", ", \"collection\": \"Digging tools\", \"name\": \"Pickaxe\", \"description\": \"Increases FarmPower\", \"rare\": \"Common\", \"bonus\": 5, \"bonusType\": \"FarmPower\"}", ", \"collection\": \"Digging tools\", \"name\": \"Pickaxe\", \"description\": \"Increases FarmPower\", \"rare\": \"Common\", \"bonus\": 10, \"bonusType\": \"FarmPower\"}"] | |
258 | 258 | ||
259 | - | let nftNames = ["SHOVEL-P3", "PICKAXE-C1"] | |
259 | + | let nftNames = ["SHOVEL-P3", "PICKAXE-C1", "PICKAXE-C3", "PICKAXE-C5", "PICKAXE-C10"] | |
260 | 260 | ||
261 | - | let contentKeys = ["contentShovelP3", "contentPickaxeC1"] | |
261 | + | let contentKeys = ["contentShovelP3", "contentPickaxeC1", "contentPickaxeC3", "contentPickaxeC5", "contentPickaxeC10"] | |
262 | 262 | ||
263 | 263 | let URL = "\"url\": \"https://waveslands.com\", " | |
264 | 264 | ||
265 | 265 | func prolog (i) = if (if ((i.originCaller != rest2Contract)) | |
266 | 266 | then valueOrElse(getBoolean(keyBlocked()), false) | |
267 | 267 | else false) | |
268 | 268 | then throw("Contracts are under maintenance") | |
269 | 269 | else { | |
270 | 270 | let addr = toString(i.originCaller) | |
271 | 271 | let week = (height / WEEK_BLOCKS) | |
272 | 272 | let lastWeekTxIdByUser = getString(keyLastWeekTxIdByUser(addr)) | |
273 | 273 | let txId = toBase58String(i.transactionId) | |
274 | 274 | let wtx = ((toString(week) + "_") + txId) | |
275 | 275 | if (isDefined(lastWeekTxIdByUser)) | |
276 | 276 | then { | |
277 | 277 | let lastWeekTx = split(value(lastWeekTxIdByUser), "_") | |
278 | 278 | if ((lastWeekTx[0] == toString(week))) | |
279 | 279 | then [StringEntry(keyLastWeekTxIdByUser(addr), wtx), StringEntry(keyCurWeekTxIdByUser(addr), wtx)] | |
280 | 280 | else if ((lastWeekTx[0] == toString((week - 1)))) | |
281 | 281 | then [StringEntry(keyCurWeekTxIdByUser(addr), wtx)] | |
282 | 282 | else { | |
283 | 283 | let curWeekTxIdByUser = getStringValue(keyLastWeekTxIdByUser(addr)) | |
284 | 284 | let curWeekTx = split(curWeekTxIdByUser, "_") | |
285 | 285 | if ((curWeekTx[0] == toString(week))) | |
286 | 286 | then [StringEntry(keyCurWeekTxIdByUser(addr), wtx)] | |
287 | 287 | else [StringEntry(keyLastWeekTxIdByUser(addr), curWeekTxIdByUser), StringEntry(keyCurWeekTxIdByUser(addr), wtx)] | |
288 | 288 | } | |
289 | 289 | } | |
290 | 290 | else [StringEntry(keyLastWeekTxIdByUser(addr), wtx), StringEntry(keyCurWeekTxIdByUser(addr), wtx)] | |
291 | 291 | } | |
292 | 292 | ||
293 | 293 | ||
294 | 294 | func issueNFTinternal (nftIndex,addr) = if ((nftIndex >= size(contentKeys))) | |
295 | 295 | then throw("nftIndex out of bounds") | |
296 | 296 | else { | |
297 | 297 | let nftSerial = (valueOrElse(getInteger(keyNftTotalIssued), -1) + 1) | |
298 | 298 | let issue = Issue(nftNames[nftIndex], (((((("{" + URL) + "\"contentKey\": \"") + contentKeys[nftIndex]) + "\", \"number\": ") + toString(nftSerial)) + nftDescriptions[nftIndex]), 1, 0, false) | |
299 | 299 | let nftAssetId = calculateAssetId(issue) | |
300 | 300 | $Tuple2([issue, IntegerEntry(keyNftTotalIssued, nftSerial), IntegerEntry(keyNftNumberByAssetId(toBase58String(nftAssetId)), nftSerial), ScriptTransfer(addr, 1, nftAssetId)], nftAssetId) | |
301 | 301 | } | |
302 | 302 | ||
303 | 303 | ||
304 | 304 | func stakeUnstakeAcresInternal (amt,address,bonusDelta) = if (if ((amt == 0)) | |
305 | 305 | then (bonusDelta == 0) | |
306 | 306 | else false) | |
307 | 307 | then throw("Nothing to do") | |
308 | 308 | else { | |
309 | 309 | let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil) | |
310 | 310 | if ((wlgResult == wlgResult)) | |
311 | 311 | then { | |
312 | 312 | let now = lastBlock.timestamp | |
313 | 313 | let timeKey = keyAcresStakedTimeByUser(address) | |
314 | 314 | let amountKey = keyAcresStakedAmtByUser(address) | |
315 | 315 | let oldAcresAmount = valueOrElse(getInteger(amountKey), 0) | |
316 | 316 | if (if ((0 > amt)) | |
317 | 317 | then (0 > (oldAcresAmount + amt)) | |
318 | 318 | else false) | |
319 | 319 | then throw(((("You have only " + fixedPoint(oldAcresAmount, 8)) + " ACRES staked, tried to unstake ") + fixedPoint(-(amt), 8))) | |
320 | 320 | else { | |
321 | 321 | let newAcresAmount = (oldAcresAmount + amt) | |
322 | 322 | let oldTotal = valueOrElse(getInteger(acresStakdTotalKey), 0) | |
323 | 323 | let userFpKey = keyFarmingPowerByUser(address) | |
324 | 324 | let oldFp = valueOrElse(getInteger(userFpKey), 0) | |
325 | 325 | let bonusKey = keyUserFullBonus(address) | |
326 | 326 | let oldBonus = valueOrElse(getInteger(acres2Contract, bonusKey), 0) | |
327 | 327 | if (if ((0 > bonusDelta)) | |
328 | 328 | then (0 > (oldBonus + bonusDelta)) | |
329 | 329 | else false) | |
330 | 330 | then throw((((("You have only " + fixedPoint(oldBonus, 4)) + "% bonus, and tried to unstake ") + fixedPoint(-(bonusDelta), 4)) + "%")) | |
331 | 331 | else { | |
332 | - | let $ | |
333 | - | let newBonusedFp = $ | |
334 | - | let ignored = $ | |
332 | + | let $t059586057 = getFarmingPowerByAcresAndBonus(newAcresAmount, (oldBonus + bonusDelta)) | |
333 | + | let newBonusedFp = $t059586057._1 | |
334 | + | let ignored = $t059586057._2 | |
335 | 335 | let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0) | |
336 | 336 | let acresActions = if ((amt == 0)) | |
337 | 337 | then nil | |
338 | 338 | else [IntegerEntry(amountKey, newAcresAmount), IntegerEntry(acresStakdTotalKey, (oldTotal + amt))] | |
339 | 339 | $Tuple2(((((acresActions :+ IntegerEntry(timeKey, lastBlock.timestamp)) :+ IntegerEntry(userFpKey, newBonusedFp)) :+ IntegerEntry(totalFarmingPowerKey, ((oldTotalFp + newBonusedFp) - oldFp))) :+ IntegerEntry(bonusKey, (oldBonus + bonusDelta))), wlgResult) | |
340 | 340 | } | |
341 | 341 | } | |
342 | 342 | } | |
343 | 343 | else throw("Strict value is not equal to itself.") | |
344 | 344 | } | |
345 | 345 | ||
346 | 346 | ||
347 | 347 | func getWlgPrice (usdtBalanceCorrection) = { | |
348 | 348 | let issuedAmount = valueOrErrorMessage(getInteger(wlgContract, wlgIssuedAmtKey), "WLGOLD is not issued yet") | |
349 | 349 | let wlgUsd = assetBalance(wlgContract, usdtAssetId) | |
350 | 350 | let acres2Usd = (assetBalance(acres2Contract, usdtAssetId) - usdtBalanceCorrection) | |
351 | 351 | let investFundTotal = (assetBalance(investFundContract, usdtAssetId) + valueOrElse(getInteger(investFundContract, zbIssuedAmtKey), 0)) | |
352 | 352 | let totalFundsUsd = ((acres2Usd + wlgUsd) + investFundTotal) | |
353 | 353 | fraction(totalFundsUsd, MULT8, issuedAmount) | |
354 | 354 | } | |
355 | 355 | ||
356 | 356 | ||
357 | 357 | func getSwapLimitAcres () = { | |
358 | 358 | let wlgUsd = assetBalance(wlgContract, usdtAssetId) | |
359 | 359 | let acres2Usd = assetBalance(this, usdtAssetId) | |
360 | 360 | let investFundTotal = (assetBalance(investFundContract, usdtAssetId) + valueOrElse(getInteger(investFundContract, zbIssuedAmtKey), 0)) | |
361 | 361 | let defaultLimit = (((acres2Usd + wlgUsd) + investFundTotal) / ONE_PERCENT_DIVISOR) | |
362 | 362 | let lastLimitLeft = valueOrElse(getInteger(keyLastLimitLeft), defaultLimit) | |
363 | 363 | let lastTime = valueOrElse(getInteger(keyLastAcresSellTime), 0) | |
364 | 364 | let now = lastBlock.timestamp | |
365 | 365 | let currentLimit = (lastLimitLeft + fraction(defaultLimit, (now - lastTime), DAY_MILLIS)) | |
366 | 366 | let limitLeftUsdt = min([currentLimit, defaultLimit]) | |
367 | 367 | $Tuple2(IntegerEntry(keyLastAcresSellTime, now), limitLeftUsdt) | |
368 | 368 | } | |
369 | 369 | ||
370 | 370 | ||
371 | 371 | let arkOracle = addressFromStringValue("3PJgZ6AK1WVCpdCmEZpesHmaKvrQDdXG5og") | |
372 | 372 | ||
373 | 373 | let incubator = valueOrElse(getString(arkOracle, "static_incubatorAddress"), "") | |
374 | 374 | ||
375 | 375 | let breeder = valueOrElse(getString(arkOracle, "static_breederAddress"), "") | |
376 | 376 | ||
377 | 377 | let turtleIncubator = valueOrElse(getString(arkOracle, "static_turtleIncubatorAddress"), "") | |
378 | 378 | ||
379 | 379 | let turtleBreeder = valueOrElse(getString(arkOracle, "static_turtleBreederAddress"), "") | |
380 | 380 | ||
381 | 381 | let canineIncubator = valueOrElse(getString(arkOracle, "static_canineIncubatorAddress"), "") | |
382 | 382 | ||
383 | 383 | let canineBreeder = valueOrElse(getString(arkOracle, "static_canineBreederAddress"), "") | |
384 | 384 | ||
385 | 385 | let felineIncubator = valueOrElse(getString(arkOracle, "static_felineIncubatorAddress"), "") | |
386 | 386 | ||
387 | 387 | let felineBreeder = valueOrElse(getString(arkOracle, "static_felineBreederAddress"), "") | |
388 | 388 | ||
389 | 389 | let mutantBreeder = valueOrElse(getString(arkOracle, "static_mutantIncubatorAddress"), "") | |
390 | 390 | ||
391 | 391 | func isArkimalIssued (nfo) = { | |
392 | 392 | let issuer = toString(nfo.issuer) | |
393 | 393 | if (if (if (if (if (if (if (if ((issuer == incubator)) | |
394 | 394 | then true | |
395 | 395 | else (issuer == breeder)) | |
396 | 396 | then true | |
397 | 397 | else (issuer == turtleIncubator)) | |
398 | 398 | then true | |
399 | 399 | else (issuer == turtleBreeder)) | |
400 | 400 | then true | |
401 | 401 | else (issuer == canineIncubator)) | |
402 | 402 | then true | |
403 | 403 | else (issuer == canineBreeder)) | |
404 | 404 | then true | |
405 | 405 | else (issuer == felineIncubator)) | |
406 | 406 | then true | |
407 | 407 | else (issuer == felineBreeder)) | |
408 | 408 | then nfo.name | |
409 | 409 | else if ((issuer == mutantBreeder)) | |
410 | 410 | then nfo.description | |
411 | 411 | else "" | |
412 | 412 | } | |
413 | 413 | ||
414 | 414 | ||
415 | 415 | func bonusByDescription (descr) = if (!(contains(descr, "\"bonusType\": \"FarmPower\""))) | |
416 | - | then throw("NFT is not supported | |
416 | + | then throw(("NFT is not supported: " + descr)) | |
417 | 417 | else { | |
418 | 418 | let bonusStr = split_4C(split_4C(descr, "\"bonus\":")[1], ",")[0] | |
419 | - | | |
419 | + | parseIntValue(drop(bonusStr, (valueOrElse(lastIndexOf(bonusStr, " "), -1) + 1))) | |
420 | 420 | } | |
421 | 421 | ||
422 | 422 | ||
423 | 423 | @Callable(i) | |
424 | 424 | func saveLastTx () = if (!(containsElement([wlgContract], i.caller))) | |
425 | 425 | then throw("Access denied") | |
426 | 426 | else $Tuple2(prolog(i), 42) | |
427 | 427 | ||
428 | 428 | ||
429 | 429 | ||
430 | 430 | @Callable(i) | |
431 | 431 | func constructorV1 (rest2Addr,oldAcrContract) = if ((i.caller != this)) | |
432 | 432 | then throw("Permission denied") | |
433 | 433 | else { | |
434 | 434 | let oldAcrContAddr = addressFromStringValue(oldAcrContract) | |
435 | 435 | [IntegerEntry(acresIssuedAmountKey, getIntegerValue(oldAcrContAddr, acresIssuedAmountKey)), BinaryEntry(acresAssetIdKey, getBinaryValue(oldAcrContAddr, acresAssetIdKey)), StringEntry(keyRest2Address(), rest2Addr), StringEntry(oldAcresContractKey, oldAcrContract)] | |
436 | 436 | } | |
437 | 437 | ||
438 | 438 | ||
439 | 439 | ||
440 | 440 | @Callable(i) | |
441 | 441 | func setBlocked (isBlocked) = if ((i.caller != this)) | |
442 | 442 | then throw("permission denied") | |
443 | 443 | else [BooleanEntry(keyBlocked(), isBlocked)] | |
444 | 444 | ||
445 | 445 | ||
446 | 446 | ||
447 | 447 | @Callable(i) | |
448 | 448 | func unstakeAcres (amount) = { | |
449 | 449 | let prologActions = prolog(i) | |
450 | 450 | if ((0 >= amount)) | |
451 | 451 | then throw("Amount should be positive") | |
452 | 452 | else { | |
453 | 453 | let address = toString(i.caller) | |
454 | 454 | if ((size(i.payments) != 0)) | |
455 | 455 | then throw("No payments required") | |
456 | 456 | else { | |
457 | 457 | let arbReleaseTime = (valueOrElse(getInteger(wlgContract, keyLastWlgTradeTimeByUser(address)), 0) + arbitrageDelay) | |
458 | 458 | if ((arbReleaseTime > lastBlock.timestamp)) | |
459 | 459 | then throw(("You traded some WLGOLD, cannot unstake until " + toString(arbReleaseTime))) | |
460 | 460 | else { | |
461 | - | let $ | |
462 | - | let actions = $ | |
463 | - | let wlgClaimedAmount = $ | |
461 | + | let $t01155211632 = stakeUnstakeAcresInternal(-(amount), address, 0) | |
462 | + | let actions = $t01155211632._1 | |
463 | + | let wlgClaimedAmount = $t01155211632._2 | |
464 | 464 | $Tuple2(((actions :+ ScriptTransfer(i.caller, amount, acresAssetId)) ++ prologActions), wlgClaimedAmount) | |
465 | 465 | } | |
466 | 466 | } | |
467 | 467 | } | |
468 | 468 | } | |
469 | 469 | ||
470 | 470 | ||
471 | 471 | ||
472 | 472 | @Callable(i) | |
473 | 473 | func stakeAcres () = { | |
474 | 474 | let prologActions = prolog(i) | |
475 | 475 | let address = toString(i.caller) | |
476 | 476 | if ((size(i.payments) != 1)) | |
477 | 477 | then throw("exactly 1 payment must be attached") | |
478 | 478 | else { | |
479 | 479 | let pmt = i.payments[0] | |
480 | 480 | let amt = pmt.amount | |
481 | 481 | if (if (!(isDefined(pmt.assetId))) | |
482 | 482 | then true | |
483 | 483 | else (value(pmt.assetId) != acresAssetId)) | |
484 | 484 | then throw("ACRES payments only!") | |
485 | 485 | else { | |
486 | - | let $ | |
487 | - | let actions = $ | |
488 | - | let wlgClaimedAmount = $ | |
486 | + | let $t01208312159 = stakeUnstakeAcresInternal(amt, address, 0) | |
487 | + | let actions = $t01208312159._1 | |
488 | + | let wlgClaimedAmount = $t01208312159._2 | |
489 | 489 | $Tuple2((actions ++ prologActions), wlgClaimedAmount) | |
490 | 490 | } | |
491 | 491 | } | |
492 | 492 | } | |
493 | 493 | ||
494 | 494 | ||
495 | 495 | ||
496 | 496 | @Callable(i) | |
497 | 497 | func buyAcres () = { | |
498 | 498 | let prologActions = prolog(i) | |
499 | 499 | if ((size(i.payments) != 1)) | |
500 | 500 | then throw("exactly 1 payment must be attached") | |
501 | 501 | else { | |
502 | 502 | let pmt = i.payments[0] | |
503 | 503 | let usdtAmount = pmt.amount | |
504 | 504 | if (if (!(isDefined(pmt.assetId))) | |
505 | 505 | then true | |
506 | 506 | else (value(pmt.assetId) != usdtAssetId)) | |
507 | 507 | then throw("USDT payments only!") | |
508 | 508 | else if ((MULT6 > usdtAmount)) | |
509 | 509 | then throw((("Min payment should be " + fixedPoint(MULT6, 6)) + " USDT")) | |
510 | 510 | else { | |
511 | 511 | let acresAmount = (usdtAmount * USDT2ACRES_MULTIPLIER) | |
512 | 512 | let wlgAmount = fraction(usdtAmount, MULT8, getWlgPrice(usdtAmount)) | |
513 | 513 | let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey)) | |
514 | 514 | let req = invoke(oldAcresAddress, "requestAcresCallback", [acresAmount], nil) | |
515 | 515 | if ((req == req)) | |
516 | 516 | then { | |
517 | 517 | let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [wlgAmount], nil)) | |
518 | 518 | $Tuple2(([ScriptTransfer(i.caller, acresAmount, acresAssetId)] ++ prologActions), wlgRemain) | |
519 | 519 | } | |
520 | 520 | else throw("Strict value is not equal to itself.") | |
521 | 521 | } | |
522 | 522 | } | |
523 | 523 | } | |
524 | 524 | ||
525 | 525 | ||
526 | 526 | ||
527 | 527 | @Callable(i) | |
528 | 528 | func buyAcresREADONLY (usdtAmount) = { | |
529 | 529 | let acresAmount = (usdtAmount * USDT2ACRES_MULTIPLIER) | |
530 | 530 | let wlgToBurn = fraction(usdtAmount, MULT8, getWlgPrice(usdtAmount)) | |
531 | 531 | $Tuple2(nil, [acresAmount, MULT6, acresAmount, wlgToBurn]) | |
532 | 532 | } | |
533 | 533 | ||
534 | 534 | ||
535 | 535 | ||
536 | 536 | @Callable(i) | |
537 | 537 | func sellAcres () = { | |
538 | 538 | let prologActions = prolog(i) | |
539 | 539 | if ((size(i.payments) != 1)) | |
540 | 540 | then throw("exactly 1 payment must be attached") | |
541 | 541 | else { | |
542 | 542 | let pmt = i.payments[0] | |
543 | 543 | let acresAmount = pmt.amount | |
544 | 544 | if (if (!(isDefined(pmt.assetId))) | |
545 | 545 | then true | |
546 | 546 | else (value(pmt.assetId) != acresAssetId)) | |
547 | 547 | then throw("ACRES payments only!") | |
548 | 548 | else if ((MULT7 > acresAmount)) | |
549 | 549 | then throw((("Min payment should be " + fixedPoint(MULT7, 8)) + " ACRES")) | |
550 | 550 | else { | |
551 | 551 | let addr = toString(i.caller) | |
552 | - | let $ | |
553 | - | let limitAction = $ | |
554 | - | let maxUsdt = $ | |
552 | + | let $t01401614064 = getSwapLimitAcres() | |
553 | + | let limitAction = $t01401614064._1 | |
554 | + | let maxUsdt = $t01401614064._2 | |
555 | 555 | let maxAcres = (maxUsdt * USDT2ACRES_MULTIPLIER) | |
556 | 556 | if ((acresAmount > maxAcres)) | |
557 | 557 | then throw((("You can sell max " + fixedPoint(maxAcres, 8)) + " ACRES")) | |
558 | 558 | else { | |
559 | 559 | let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2) | |
560 | 560 | $Tuple2(([limitAction, IntegerEntry(keyLastLimitLeft, (maxUsdt - usdtAmount)), ScriptTransfer(i.caller, usdtAmount, usdtAssetId)] ++ prologActions), usdtAmount) | |
561 | 561 | } | |
562 | 562 | } | |
563 | 563 | } | |
564 | 564 | } | |
565 | 565 | ||
566 | 566 | ||
567 | 567 | ||
568 | 568 | @Callable(i) | |
569 | 569 | func sellAcresREADONLY (address,acresAmount) = { | |
570 | - | let $ | |
571 | - | let limitAction = $ | |
572 | - | let maxUsdt = $ | |
570 | + | let $t01456014608 = getSwapLimitAcres() | |
571 | + | let limitAction = $t01456014608._1 | |
572 | + | let maxUsdt = $t01456014608._2 | |
573 | 573 | let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2) | |
574 | 574 | $Tuple2(nil, [usdtAmount, MULT7, (maxUsdt * USDT2ACRES_MULTIPLIER), 0]) | |
575 | 575 | } | |
576 | 576 | ||
577 | 577 | ||
578 | 578 | ||
579 | 579 | @Callable(i) | |
580 | 580 | func convertOldStakes () = if ((i.caller != this)) | |
581 | 581 | then throw("Temporarily disabled") | |
582 | 582 | else { | |
583 | 583 | let address = toString(i.caller) | |
584 | 584 | if ((size(i.payments) != 0)) | |
585 | 585 | then throw("No payments required") | |
586 | 586 | else { | |
587 | 587 | let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey)) | |
588 | 588 | let amount = valueOrElse(getInteger(oldAcresAddress, keyAcresStakedAmtByUser(address)), 0) | |
589 | 589 | let gotAcres0 = if ((amount > 0)) | |
590 | 590 | then asTuple2Ints(invoke(oldAcresAddress, "unstakeAcresCallback", [amount, address], nil)) | |
591 | 591 | else $Tuple2(0, 0) | |
592 | 592 | let oldStakingAddress = addressFromStringValue(oldStakingContractStr) | |
593 | 593 | let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address)) | |
594 | 594 | let landsResult = if (isDefined(landsStr)) | |
595 | 595 | then { | |
596 | 596 | let lands = split_51C(value(landsStr), "_") | |
597 | 597 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
598 | 598 | then throw("landAssetId is required") | |
599 | 599 | else { | |
600 | 600 | let r = asTuple5Ints(invoke(oldStakingAddress, "unstakeLandCallback", [landAssetId, address], nil)) | |
601 | 601 | $Tuple4((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4)) | |
602 | 602 | } | |
603 | 603 | ||
604 | 604 | let rr = { | |
605 | 605 | let $l = lands | |
606 | 606 | let $s = size($l) | |
607 | 607 | let $acc0 = $Tuple4(0, 0, 0, 0) | |
608 | 608 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
609 | 609 | then $a | |
610 | 610 | else oneLand($a, $l[$i]) | |
611 | 611 | ||
612 | 612 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
613 | 613 | then $a | |
614 | 614 | else throw("List size exceeds 100") | |
615 | 615 | ||
616 | 616 | $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) | |
617 | 617 | } | |
618 | 618 | let finalize = invoke(oldStakingAddress, "unstakeLandsFinalizeCallback", [address], nil) | |
619 | 619 | if ((finalize == finalize)) | |
620 | 620 | then { | |
621 | 621 | let req = invoke(oldAcresAddress, "requestAcresCallback", [(((rr._1 + rr._2) + rr._3) + rr._4)], nil) | |
622 | 622 | if ((req == req)) | |
623 | 623 | then { | |
624 | - | let $ | |
625 | - | let nftActions = $ | |
626 | - | let nftAssetId = $ | |
624 | + | let $t01648016560 = issueNFTinternal(IdxDtx3PercConversion, i.caller) | |
625 | + | let nftActions = $t01648016560._1 | |
626 | + | let nftAssetId = $t01648016560._2 | |
627 | 627 | $Tuple5(rr._1, rr._2, rr._3, rr._4, nftActions) | |
628 | 628 | } | |
629 | 629 | else throw("Strict value is not equal to itself.") | |
630 | 630 | } | |
631 | 631 | else throw("Strict value is not equal to itself.") | |
632 | 632 | } | |
633 | 633 | else $Tuple5(0, 0, 0, 0, nil) | |
634 | 634 | let duckAssetId = valueOrElse(getString(oldStakingAddress, keyStakedDuckByOwner(address)), "") | |
635 | 635 | let duckResult = if ((duckAssetId != "")) | |
636 | 636 | then asTuple3Ints(invoke(oldStakingAddress, "unstakeDuckCallback", [duckAssetId, address], nil)) | |
637 | 637 | else $Tuple3(0, 0, 0) | |
638 | 638 | let x = stakeUnstakeAcresInternal((((((((gotAcres0._1 + landsResult._1) + landsResult._2) + landsResult._3) + landsResult._4) + duckResult._1) + duckResult._2) + duckResult._3), address, 0) | |
639 | 639 | $Tuple2((landsResult._5 ++ x._1), x._2) | |
640 | 640 | } | |
641 | 641 | } | |
642 | 642 | ||
643 | 643 | ||
644 | 644 | ||
645 | 645 | @Callable(i) | |
646 | 646 | func unstakeLandsREADONLY (address) = { | |
647 | 647 | let oldStakingAddress = addressFromStringValue(oldStakingContractStr) | |
648 | 648 | let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address)) | |
649 | 649 | let landsResult = if (isDefined(landsStr)) | |
650 | 650 | then { | |
651 | 651 | let lands = split_51C(value(landsStr), "_") | |
652 | 652 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
653 | 653 | then throw("landAssetId is required") | |
654 | 654 | else { | |
655 | 655 | let r = asTuple4Ints(invoke(oldStakingAddress, "unstakeLandREADONLY", [landAssetId, address], nil)) | |
656 | 656 | $Tuple4((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4)) | |
657 | 657 | } | |
658 | 658 | ||
659 | 659 | let $l = lands | |
660 | 660 | let $s = size($l) | |
661 | 661 | let $acc0 = $Tuple4(0, 0, 0, 0) | |
662 | 662 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
663 | 663 | then $a | |
664 | 664 | else oneLand($a, $l[$i]) | |
665 | 665 | ||
666 | 666 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
667 | 667 | then $a | |
668 | 668 | else throw("List size exceeds 100") | |
669 | 669 | ||
670 | 670 | $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) | |
671 | 671 | } | |
672 | 672 | else $Tuple4(0, 0, 0, 0) | |
673 | 673 | $Tuple2(nil, landsResult) | |
674 | 674 | } | |
675 | 675 | ||
676 | 676 | ||
677 | 677 | ||
678 | 678 | @Callable(i) | |
679 | 679 | func stakeAcresCallback (addr) = if ((i.caller != addressFromStringValue(oldStakingContractStr))) | |
680 | 680 | then throw("Permission denied") | |
681 | 681 | else stakeUnstakeAcresInternal(i.payments[0].amount, addr, 0) | |
682 | 682 | ||
683 | 683 | ||
684 | 684 | ||
685 | 685 | @Callable(i) | |
686 | 686 | func simulateStakeAcresREADONLY (address,addedAmount) = { | |
687 | 687 | let amountKey = keyAcresStakedAmtByUser(address) | |
688 | 688 | let newAcresAmount = (valueOrElse(getInteger(amountKey), 0) + addedAmount) | |
689 | 689 | let oldTotal = valueOrElse(getInteger(acresStakdTotalKey), 0) | |
690 | 690 | let userFpKey = keyFarmingPowerByUser(address) | |
691 | 691 | let oldFp = valueOrElse(getInteger(userFpKey), 0) | |
692 | 692 | let userBonus = valueOrElse(getInteger(acres2Contract, keyUserFullBonus(address)), 0) | |
693 | - | let $ | |
694 | - | let newBonusedFp = $ | |
695 | - | let ignored = $ | |
693 | + | let $t01872518812 = getFarmingPowerByAcresAndBonus(newAcresAmount, userBonus) | |
694 | + | let newBonusedFp = $t01872518812._1 | |
695 | + | let ignored = $t01872518812._2 | |
696 | 696 | let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0) | |
697 | 697 | let newTotalFp = ((oldTotalFp + newBonusedFp) - oldFp) | |
698 | 698 | $Tuple2(nil, [oldFp, newBonusedFp, oldTotalFp, newTotalFp]) | |
699 | 699 | } | |
700 | 700 | ||
701 | 701 | ||
702 | 702 | ||
703 | 703 | @Callable(i) | |
704 | 704 | func issueNFT (forAddress,nftIndex) = if ((i.caller != wlgContract)) | |
705 | 705 | then throw("Permission denied") | |
706 | 706 | else issueNFTinternal(nftIndex, addressFromStringValue(forAddress)) | |
707 | 707 | ||
708 | 708 | ||
709 | 709 | ||
710 | 710 | @Callable(i) | |
711 | 711 | func stakeNFT () = { | |
712 | 712 | let prologActions = prolog(i) | |
713 | 713 | if ((size(i.payments) != 1)) | |
714 | 714 | then throw("Exactly one payment required") | |
715 | 715 | else { | |
716 | 716 | let pmt = value(i.payments[0]) | |
717 | 717 | if ((pmt.amount != 1)) | |
718 | 718 | then throw("NFT token should be attached as payment") | |
719 | 719 | else { | |
720 | 720 | let assetId = value(pmt.assetId) | |
721 | 721 | let asset = value(assetInfo(assetId)) | |
722 | 722 | let assetIdStr = toBase58String(assetId) | |
723 | 723 | let addr = toString(i.caller) | |
724 | 724 | let nftsKey = keyStakedNFTsByOwner(addr) | |
725 | 725 | let nftsStr = getString(nftsKey) | |
726 | 726 | let nfts = if (isDefined(nftsStr)) | |
727 | 727 | then split_4C(value(nftsStr), "_") | |
728 | 728 | else nil | |
729 | 729 | if (containsElement(nfts, assetIdStr)) | |
730 | - | then throw(("Your staked | |
730 | + | then throw(("Your staked NFTs already contain " + assetIdStr)) | |
731 | 731 | else if ((size(nfts) >= MAX_NFTS_STAKED_BY_USER)) | |
732 | 732 | then throw((("Your already staked max (" + toString(MAX_NFTS_STAKED_BY_USER)) + ") NFTs")) | |
733 | 733 | else { | |
734 | 734 | let listAction = StringEntry(nftsKey, makeString_2C((nfts :+ assetIdStr), "_")) | |
735 | 735 | let isWL = (asset.issuer == this) | |
736 | 736 | if (isWL) | |
737 | 737 | then { | |
738 | 738 | let wlNftNumber = valueOrElse(getInteger(keyUserWlNftNumber(addr)), 0) | |
739 | 739 | if ((wlNftNumber >= MAX_WL_NFTS)) | |
740 | 740 | then throw((("You can stake max " + toString(MAX_WL_NFTS)) + " of WavesLands NFTs")) | |
741 | 741 | else { | |
742 | - | let bonusVal = bonusByDescription(value(asset.description)) | |
743 | - | let $ | |
744 | - | let actions = $ | |
745 | - | let wlgClaimedAmount = $ | |
742 | + | let bonusVal = (bonusByDescription(value(asset.description)) * 10000) | |
743 | + | let $t02058720665 = stakeUnstakeAcresInternal(0, addr, bonusVal) | |
744 | + | let actions = $t02058720665._1 | |
745 | + | let wlgClaimedAmount = $t02058720665._2 | |
746 | 746 | $Tuple2(((((actions :+ listAction) :+ IntegerEntry(keyUserWlNftNumber(addr), (wlNftNumber + 1))) :+ IntegerEntry(keyStakedTimeByAssetIdAndOwner(assetIdStr, addr), lastBlock.timestamp)) ++ prologActions), wlgClaimedAmount) | |
747 | 747 | } | |
748 | 748 | } | |
749 | 749 | else { | |
750 | 750 | let arkimalName = isArkimalIssued(asset) | |
751 | 751 | if ((arkimalName == "")) | |
752 | 752 | then throw("Only WavesLands and Arkimals NFT tokens are accepted") | |
753 | 753 | else { | |
754 | 754 | let arkNftNumber = valueOrElse(getInteger(keyUserArkNftNumber(addr)), 0) | |
755 | 755 | if ((arkNftNumber >= MAX_ARK_NFTS)) | |
756 | 756 | then throw((("You can stake max " + toString(MAX_ARK_NFTS)) + " of Arkimals NFTs")) | |
757 | 757 | else { | |
758 | - | let $ | |
759 | - | let actions = $ | |
760 | - | let wlgClaimedAmount = $ | |
758 | + | let $t02130721390 = stakeUnstakeAcresInternal(0, addr, ARK_NFT_BONUS) | |
759 | + | let actions = $t02130721390._1 | |
760 | + | let wlgClaimedAmount = $t02130721390._2 | |
761 | 761 | $Tuple2(((((actions :+ listAction) :+ IntegerEntry(keyUserArkNftNumber(addr), (arkNftNumber + 1))) :+ IntegerEntry(keyStakedTimeByAssetIdAndOwner(assetIdStr, addr), lastBlock.timestamp)) ++ prologActions), wlgClaimedAmount) | |
762 | 762 | } | |
763 | 763 | } | |
764 | 764 | } | |
765 | 765 | } | |
766 | 766 | } | |
767 | 767 | } | |
768 | 768 | } | |
769 | 769 | ||
770 | 770 | ||
771 | 771 | ||
772 | 772 | @Callable(i) | |
773 | 773 | func unstakeNFT (assetIdStr) = { | |
774 | 774 | let prologActions = prolog(i) | |
775 | 775 | if ((size(i.payments) != 0)) | |
776 | 776 | then throw("No payments required") | |
777 | 777 | else { | |
778 | 778 | let assetId = fromBase58String(assetIdStr) | |
779 | 779 | let addr = toString(i.caller) | |
780 | 780 | let asset = value(assetInfo(assetId)) | |
781 | 781 | let timeKey = keyStakedTimeByAssetIdAndOwner(assetIdStr, addr) | |
782 | 782 | if (!(isDefined(getInteger(timeKey)))) | |
783 | 783 | then throw((("NFT " + asset.name) + " is not staked by you")) | |
784 | 784 | else { | |
785 | 785 | let nftsKey = keyStakedNFTsByOwner(addr) | |
786 | 786 | let nfts = split_4C(valueOrElse(getString(nftsKey), ""), "_") | |
787 | 787 | let idx = indexOf(nfts, assetIdStr) | |
788 | 788 | if (!(isDefined(idx))) | |
789 | 789 | then throw(("Your staked NFTs don't contain " + assetIdStr)) | |
790 | 790 | else { | |
791 | 791 | let listAction = if ((size(nfts) > 1)) | |
792 | 792 | then StringEntry(nftsKey, makeString_2C(removeByIndex(nfts, value(idx)), "_")) | |
793 | 793 | else DeleteEntry(nftsKey) | |
794 | 794 | let isWL = (asset.issuer == this) | |
795 | 795 | if (isWL) | |
796 | 796 | then { | |
797 | 797 | let wlNftNumber = valueOrElse(getInteger(keyUserWlNftNumber(addr)), 0) | |
798 | 798 | let bonusVal = bonusByDescription(value(asset.description)) | |
799 | - | let $ | |
800 | - | let actions = $ | |
801 | - | let wlgClaimedAmount = $ | |
799 | + | let $t02270322782 = stakeUnstakeAcresInternal(0, addr, -(bonusVal)) | |
800 | + | let actions = $t02270322782._1 | |
801 | + | let wlgClaimedAmount = $t02270322782._2 | |
802 | 802 | $Tuple2((((((actions :+ listAction) :+ IntegerEntry(keyUserWlNftNumber(addr), (wlNftNumber - 1))) :+ DeleteEntry(keyStakedTimeByAssetIdAndOwner(toBase58String(assetId), addr))) :+ ScriptTransfer(i.caller, 1, assetId)) ++ prologActions), wlgClaimedAmount) | |
803 | 803 | } | |
804 | 804 | else { | |
805 | 805 | let arkimalName = isArkimalIssued(asset) | |
806 | 806 | if ((arkimalName == "")) | |
807 | 807 | then throw("Only WavesLands and Arkimals NFT tokens are accepted") | |
808 | 808 | else { | |
809 | 809 | let arkNftNumber = valueOrElse(getInteger(keyUserArkNftNumber(addr)), 0) | |
810 | - | let $ | |
811 | - | let actions = $ | |
812 | - | let wlgClaimedAmount = $ | |
810 | + | let $t02333923423 = stakeUnstakeAcresInternal(0, addr, -(ARK_NFT_BONUS)) | |
811 | + | let actions = $t02333923423._1 | |
812 | + | let wlgClaimedAmount = $t02333923423._2 | |
813 | 813 | $Tuple2((((((actions :+ listAction) :+ IntegerEntry(keyUserArkNftNumber(addr), (arkNftNumber - 1))) :+ DeleteEntry(keyStakedTimeByAssetIdAndOwner(toBase58String(assetId), addr))) :+ ScriptTransfer(i.caller, 1, assetId)) ++ prologActions), wlgClaimedAmount) | |
814 | 814 | } | |
815 | 815 | } | |
816 | 816 | } | |
817 | 817 | } | |
818 | 818 | } | |
819 | 819 | } | |
820 | 820 | ||
821 | 821 | ||
822 | + | ||
823 | + | @Callable(i) | |
824 | + | func exchangeNFTs () = { | |
825 | + | let prologActions = prolog(i) | |
826 | + | if ((3 > size(i.payments))) | |
827 | + | then throw("Min one USDT and 2 NFT payments allowed") | |
828 | + | else if ((size(i.payments) > 6)) | |
829 | + | then throw("Max one USDT and 5 NFT payments allowed") | |
830 | + | else { | |
831 | + | let addr = toString(i.caller) | |
832 | + | func addUp (acc,pmt) = { | |
833 | + | let assetId = valueOrErrorMessage(pmt.assetId, "WAVES payments not allowed") | |
834 | + | if ((assetId == usdtAssetId)) | |
835 | + | then $Tuple3((acc._1 + pmt.amount), acc._2, acc._3) | |
836 | + | else { | |
837 | + | let asset = value(assetInfo(assetId)) | |
838 | + | if ((asset.issuer != this)) | |
839 | + | then throw("Only WL-issued NFTs allowed") | |
840 | + | else { | |
841 | + | let bonusPerc = bonusByDescription(value(asset.description)) | |
842 | + | $Tuple3(acc._1, (acc._2 + bonusPerc), (acc._3 :+ Burn(assetId, 1))) | |
843 | + | } | |
844 | + | } | |
845 | + | } | |
846 | + | ||
847 | + | let $t02457124650 = { | |
848 | + | let $l = i.payments | |
849 | + | let $s = size($l) | |
850 | + | let $acc0 = $Tuple3(0, 0, nil) | |
851 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
852 | + | then $a | |
853 | + | else addUp($a, $l[$i]) | |
854 | + | ||
855 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
856 | + | then $a | |
857 | + | else throw("List size exceeds 6") | |
858 | + | ||
859 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
860 | + | } | |
861 | + | let usdtFee = $t02457124650._1 | |
862 | + | let totalBonus = $t02457124650._2 | |
863 | + | let burnActions = $t02457124650._3 | |
864 | + | let nftIndex = if ((totalBonus == 3)) | |
865 | + | then 2 | |
866 | + | else if ((totalBonus == 5)) | |
867 | + | then 3 | |
868 | + | else if ((totalBonus == 10)) | |
869 | + | then 4 | |
870 | + | else throw("Only bonuses of 3%, 5% or 10% are supported") | |
871 | + | let change = ((totalBonus * MULT6) - usdtFee) | |
872 | + | if ((0 > change)) | |
873 | + | then throw((("You need to attach " + fixedPoint(usdtFee, 6)) + "USDT as fee")) | |
874 | + | else { | |
875 | + | let changeActions = if ((change > 0)) | |
876 | + | then [ScriptTransfer(i.caller, change, usdtAssetId)] | |
877 | + | else nil | |
878 | + | let $t02510625173 = issueNFTinternal(nftIndex, i.caller) | |
879 | + | let nftActions = $t02510625173._1 | |
880 | + | let nftAssetId = $t02510625173._2 | |
881 | + | $Tuple2(((((nftActions ++ burnActions) ++ prologActions) ++ changeActions) :+ ScriptTransfer(i.caller, 1, nftAssetId)), nftAssetId) | |
882 | + | } | |
883 | + | } | |
884 | + | } | |
885 | + | ||
886 | + |
github/deemru/w8io/169f3d6 112.27 ms ◑