tx · A7ZdxZ895MU6GEHkV9ZRtM7K3PbknVEMwnecSGNqWbTk 3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh: -0.02700000 Waves 2024.11.28 03:49 [3390590] smart account 3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh > SELF 0.00000000 Waves
{ "type": 13, "id": "A7ZdxZ895MU6GEHkV9ZRtM7K3PbknVEMwnecSGNqWbTk", "fee": 2700000, "feeAssetId": null, "timestamp": 1732755008800, "version": 2, "chainId": 84, "sender": "3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh", "senderPublicKey": "3QtfC1XbLZXdeawMDeSERy9vvjUmj1XYd2GFmrvx7pWQ", "proofs": [ "5BuXP5jGSuqAN3ywtf6Rdr2piy9ztymiMuZL4NgJNzwe9f67u4jgawCWGuhX2UHU1LvGPdMVMJBeLhkYeuqXs5FV" ], "script": "base64:BgJGCAISABIECgIICBIDCgEEEgMKAQESABIAEgMKAQESABIECgIIARIAEgMKAQgSAwoBCBIECgIIARIECgIIARIAEgMKAQgSAGEAA1NFUAICX18ABU1VTFQ2AMCEPQAFTVVMVDcAgK3iBAAFTVVMVDgAgMLXLwAKREFZX01JTExJUwCAuJkpABVVU0RUMkFDUkVTX01VTFRJUExJRVIACgATT05FX1BFUkNFTlRfRElWSVNPUgBkAAVjaGFpbgkAyQECCQDKAQIIBQR0aGlzBWJ5dGVzAAEAAQALV0VFS19CTE9DS1MEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDAA4E4DCQAAAgEBVAUHJG1hdGNoMAC0AQkAAgECDVVua25vd24gY2hhaW4AC3VzZHRBc3NldElkBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwASCE2nqyCAM/TtG7yo7ui5O8yYLdC136B5ao1CP5qA//uQMJAAACAQFUBQckbWF0Y2gwASBVsdifcoeC7+XjW42sBatl3ppDoS8WuwXzGreHpfHFGAkAAgECDVVua25vd24gY2hhaW4AFmRlZm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SBvciAxMCUgYXJlIHN1cHBvcnRlZAQGY2hhbmdlCQBlAgUHdXNkdEZlZQkAaAIFCnRvdGFsQm9udXMFBU1VTFQ2AwkAZgIAAAUGY2hhbmdlCQACAQkArAICCQCsAgICE1lvdSBuZWVkIHRvIGF0dGFjaCAJAKQDAQUKdG90YWxCb251cwIMIFVTRFQgYXMgZmVlBA1jaGFuZ2VBY3Rpb25zAwkAZgIFBmNoYW5nZQAACQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgUGY2hhbmdlBQt1c2R0QXNzZXRJZAUDbmlsBQNuaWwEDSR0MDI0OTI1MjQ5OTcJARBpc3N1ZU5GVGludGVybmFsAgUIbmZ0SW5kZXgIBQFpBmNhbGxlcgQPaXNzdWVOZnRBY3Rpb25zCAUNJHQwMjQ5MjUyNDk5NwJfMQQKbmZ0QXNzZXRJZAgFDSR0MDI0OTI1MjQ5OTcCXzIEBmJ1cm5lZAkAkAMBBQtidXJuQWN0aW9ucwQSYnVybkNvdW50ZXJBY3Rpb25zAwkAAAIFBmJ1cm5lZAAABQNuaWwJAMwIAgkBDEludGVnZXJFbnRyeQIFEWtleU5mdFRvdGFsQnVybmVkCQBkAgkBC3ZhbHVlT3JFbHNlAgkAnwgBBRFrZXlOZnRUb3RhbEJ1cm5lZAAABQZidXJuZWQFA25pbAkAlAoCCQDOCAIJAM4IAgkAzggCCQDOCAIFD2lzc3VlTmZ0QWN0aW9ucwULYnVybkFjdGlvbnMFEmJ1cm5Db3VudGVyQWN0aW9ucwUNcHJvbG9nQWN0aW9ucwUNY2hhbmdlQWN0aW9ucwUKbmZ0QXNzZXRJZADAiP8T", "height": 3390590, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3eBv7G3dZH3x5CCrig5BdUvVBSBWAX6YLpDWb1H9tHEf Next: A8VGKJakrnEL9esjq6YUKBHKw6ojsKmQD8wDjW83XPtL Diff:
Old | New | Differences | |
---|---|---|---|
207 | 207 | ||
208 | 208 | let keyWlNftTotalStaked = "WlNftTotalStaked" | |
209 | 209 | ||
210 | + | let keyArkNftTotalStaked = "ArkNftTotalStaked" | |
211 | + | ||
210 | 212 | func keyNftNumberByAssetId (assetId) = ("nftNumberByAssetId_" + assetId) | |
211 | 213 | ||
212 | 214 | ||
258 | 260 | ||
259 | 261 | let keyLastLimitLeft = "lastLimitLeft" | |
260 | 262 | ||
261 | - | 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\"}"] | |
262 | - | ||
263 | 263 | let nftNames = ["SHOVEL-P3", "PICKAXE-C1", "PICKAXE-C3", "PICKAXE-C5", "PICKAXE-C10"] | |
264 | 264 | ||
265 | 265 | let contentKeys = ["contentShovelP3", "contentPickaxeC1", "contentPickaxeC3", "contentPickaxeC5", "contentPickaxeC10"] | |
266 | 266 | ||
267 | - | let URL = "\"url\": \"https://waveslands.com\", " | |
267 | + | let names = ["Gold shovel", "Pickaxe", "Pickaxe", "Pickaxe", "Pickaxe"] | |
268 | + | ||
269 | + | let descriptions = ["Reward for early birds", "Increases FarmPower", "Increases FarmPower", "Increases FarmPower", "Increases FarmPower"] | |
270 | + | ||
271 | + | let rarities = ["Promo", "Common", "Common", "Common", "Common"] | |
272 | + | ||
273 | + | let bonuses = [3, 1, 3, 5, 10] | |
268 | 274 | ||
269 | 275 | func prolog (i) = if (if ((i.originCaller != rest2Contract)) | |
270 | 276 | then valueOrElse(getBoolean(keyBlocked()), false) | |
295 | 301 | } | |
296 | 302 | ||
297 | 303 | ||
304 | + | func createNftDescription (nftIndex,nftSerial) = ((((((((((((((((((((("{\"url\": \"https://waveslands.com\", " + "\"contentKey\": \"") + contentKeys[nftIndex]) + "\", ") + "\"number\": ") + nftSerial) + ", ") + "\"collection\": \"Digging tools") + "\", ") + "\"name\": \"") + names[nftIndex]) + "\", ") + "\"description\": \"") + descriptions[nftIndex]) + "\", ") + "\"rare\": \"") + rarities[nftIndex]) + "\", ") + "\"bonus\": ") + toString(bonuses[nftIndex])) + ", ") + "\"bonusType\": \"FarmPower\"}") | |
305 | + | ||
306 | + | ||
298 | 307 | func issueNFTinternal (nftIndex,addr) = if ((nftIndex >= size(contentKeys))) | |
299 | 308 | then throw("nftIndex out of bounds") | |
300 | 309 | else { | |
301 | 310 | let nftSerial = (valueOrElse(getInteger(keyNftTotalIssued), -1) + 1) | |
302 | - | let issue = Issue(nftNames[nftIndex], ( | |
311 | + | let issue = Issue(nftNames[nftIndex], createNftDescription(nftIndex, toString(nftSerial)), 1, 0, false) | |
303 | 312 | let nftAssetId = calculateAssetId(issue) | |
304 | - | $Tuple2([issue, IntegerEntry(keyNftTotalIssued, nftSerial), IntegerEntry(keyNftNumberByAssetId(toBase58String(nftAssetId)), nftSerial), ScriptTransfer(addr, 1, nftAssetId)], nftAssetId) | |
313 | + | $Tuple2([issue, IntegerEntry(keyNftTotalIssued, (nftSerial + 1)), IntegerEntry(keyNftNumberByAssetId(toBase58String(nftAssetId)), nftSerial), ScriptTransfer(addr, 1, nftAssetId)], nftAssetId) | |
305 | 314 | } | |
306 | 315 | ||
307 | 316 | ||
333 | 342 | else false) | |
334 | 343 | then throw((((("You have only " + fixedPoint(oldBonus, 4)) + "% bonus, and tried to unstake ") + fixedPoint(-(bonusDelta), 4)) + "%")) | |
335 | 344 | else { | |
336 | - | let $ | |
337 | - | let newBonusedFp = $ | |
338 | - | let ignored = $ | |
345 | + | let $t057945893 = getFarmingPowerByAcresAndBonus(newAcresAmount, (oldBonus + bonusDelta)) | |
346 | + | let newBonusedFp = $t057945893._1 | |
347 | + | let ignored = $t057945893._2 | |
339 | 348 | let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0) | |
340 | 349 | let acresActions = if ((amt == 0)) | |
341 | 350 | then nil | |
394 | 403 | ||
395 | 404 | func isArkimalIssued (nfo) = { | |
396 | 405 | let issuer = toString(nfo.issuer) | |
397 | - | if (if (if (if (if (if (if (if ((issuer == incubator)) | |
406 | + | if (if (if (if (if (if (if (if (if (if ((chain == base58'2T')) | |
407 | + | then (issuer == oldStakingContractStr) | |
408 | + | else false) | |
409 | + | then true | |
410 | + | else (issuer == incubator)) | |
398 | 411 | then true | |
399 | 412 | else (issuer == breeder)) | |
400 | 413 | then true | |
422 | 435 | let bonusStr = split_4C(split_4C(descr, "\"bonus\":")[1], ",")[0] | |
423 | 436 | parseIntValue(drop(bonusStr, (valueOrElse(lastIndexOf(bonusStr, " "), -1) + 1))) | |
424 | 437 | } | |
438 | + | ||
439 | + | ||
440 | + | func stakeNftInternal (addr,assetIdStr,bonus6,userNumKey,totalNumKey,limit) = { | |
441 | + | let nftNumber = valueOrElse(getInteger(userNumKey), 0) | |
442 | + | if ((nftNumber >= limit)) | |
443 | + | then throw((("You can stake max " + toString(limit)) + " of such NFTs")) | |
444 | + | else { | |
445 | + | let $t01040710483 = stakeUnstakeAcresInternal(0, addr, bonus6) | |
446 | + | let actions = $t01040710483._1 | |
447 | + | let wlgClaimedAmount = $t01040710483._2 | |
448 | + | $Tuple2((((actions :+ IntegerEntry(userNumKey, (nftNumber + 1))) :+ IntegerEntry(totalNumKey, (valueOrElse(getInteger(totalNumKey), 0) + 1))) :+ IntegerEntry(keyStakedTimeByAssetIdAndOwner(assetIdStr, addr), lastBlock.timestamp)), wlgClaimedAmount) | |
449 | + | } | |
450 | + | } | |
425 | 451 | ||
426 | 452 | ||
427 | 453 | @Callable(i) | |
462 | 488 | if ((arbReleaseTime > lastBlock.timestamp)) | |
463 | 489 | then throw(("You traded some WLGOLD, cannot unstake until " + toString(arbReleaseTime))) | |
464 | 490 | else { | |
465 | - | let $ | |
466 | - | let actions = $ | |
467 | - | let wlgClaimedAmount = $ | |
491 | + | let $t01205712137 = stakeUnstakeAcresInternal(-(amount), address, 0) | |
492 | + | let actions = $t01205712137._1 | |
493 | + | let wlgClaimedAmount = $t01205712137._2 | |
468 | 494 | $Tuple2(((actions :+ ScriptTransfer(i.caller, amount, acresAssetId)) ++ prologActions), wlgClaimedAmount) | |
469 | 495 | } | |
470 | 496 | } | |
487 | 513 | else (value(pmt.assetId) != acresAssetId)) | |
488 | 514 | then throw("ACRES payments only!") | |
489 | 515 | else { | |
490 | - | let $ | |
491 | - | let actions = $ | |
492 | - | let wlgClaimedAmount = $ | |
516 | + | let $t01258812664 = stakeUnstakeAcresInternal(amt, address, 0) | |
517 | + | let actions = $t01258812664._1 | |
518 | + | let wlgClaimedAmount = $t01258812664._2 | |
493 | 519 | $Tuple2((actions ++ prologActions), wlgClaimedAmount) | |
494 | 520 | } | |
495 | 521 | } | |
553 | 579 | then throw((("Min payment should be " + fixedPoint(MULT7, 8)) + " ACRES")) | |
554 | 580 | else { | |
555 | 581 | let addr = toString(i.caller) | |
556 | - | let $ | |
557 | - | let limitAction = $ | |
558 | - | let maxUsdt = $ | |
582 | + | let $t01452114569 = getSwapLimitAcres() | |
583 | + | let limitAction = $t01452114569._1 | |
584 | + | let maxUsdt = $t01452114569._2 | |
559 | 585 | let maxAcres = (maxUsdt * USDT2ACRES_MULTIPLIER) | |
560 | 586 | if ((acresAmount > maxAcres)) | |
561 | 587 | then throw((("You can sell max " + fixedPoint(maxAcres, 8)) + " ACRES")) | |
571 | 597 | ||
572 | 598 | @Callable(i) | |
573 | 599 | func sellAcresREADONLY (address,acresAmount) = { | |
574 | - | let $ | |
575 | - | let limitAction = $ | |
576 | - | let maxUsdt = $ | |
600 | + | let $t01506515113 = getSwapLimitAcres() | |
601 | + | let limitAction = $t01506515113._1 | |
602 | + | let maxUsdt = $t01506515113._2 | |
577 | 603 | let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2) | |
578 | 604 | $Tuple2(nil, [usdtAmount, MULT7, (maxUsdt * USDT2ACRES_MULTIPLIER), 0]) | |
579 | 605 | } | |
625 | 651 | let req = invoke(oldAcresAddress, "requestAcresCallback", [(((rr._1 + rr._2) + rr._3) + rr._4)], nil) | |
626 | 652 | if ((req == req)) | |
627 | 653 | then { | |
628 | - | let $ | |
629 | - | let nftActions = $ | |
630 | - | let nftAssetId = $ | |
654 | + | let $t01698217062 = issueNFTinternal(IdxDtx3PercConversion, i.caller) | |
655 | + | let nftActions = $t01698217062._1 | |
656 | + | let nftAssetId = $t01698217062._2 | |
631 | 657 | $Tuple5(rr._1, rr._2, rr._3, rr._4, nftActions) | |
632 | 658 | } | |
633 | 659 | else throw("Strict value is not equal to itself.") | |
694 | 720 | let userFpKey = keyFarmingPowerByUser(address) | |
695 | 721 | let oldFp = valueOrElse(getInteger(userFpKey), 0) | |
696 | 722 | let userBonus = valueOrElse(getInteger(acres2Contract, keyUserFullBonus(address)), 0) | |
697 | - | let $ | |
698 | - | let newBonusedFp = $ | |
699 | - | let ignored = $ | |
723 | + | let $t01922719314 = getFarmingPowerByAcresAndBonus(newAcresAmount, userBonus) | |
724 | + | let newBonusedFp = $t01922719314._1 | |
725 | + | let ignored = $t01922719314._2 | |
700 | 726 | let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0) | |
701 | 727 | let newTotalFp = ((oldTotalFp + newBonusedFp) - oldFp) | |
702 | 728 | $Tuple2(nil, [oldFp, newBonusedFp, oldTotalFp, newTotalFp]) | |
736 | 762 | then throw((("Your already staked max (" + toString(MAX_NFTS_STAKED_BY_USER)) + ") NFTs")) | |
737 | 763 | else { | |
738 | 764 | let listAction = StringEntry(nftsKey, makeString_2C((nfts :+ assetIdStr), "_")) | |
739 | - | let isWL = (asset.issuer == this) | |
740 | - | if (isWL) | |
765 | + | if ((asset.issuer == this)) | |
741 | 766 | then { | |
742 | - | let wlNftNumber = valueOrElse(getInteger(keyUserWlNftNumber(addr)), 0) | |
743 | - | if ((wlNftNumber >= MAX_WL_NFTS)) | |
744 | - | then throw((("You can stake max " + toString(MAX_WL_NFTS)) + " of WavesLands NFTs")) | |
745 | - | else { | |
746 | - | let bonusVal = (bonusByDescription(value(asset.description)) * 10000) | |
747 | - | let $t02058720665 = stakeUnstakeAcresInternal(0, addr, bonusVal) | |
748 | - | let actions = $t02058720665._1 | |
749 | - | let wlgClaimedAmount = $t02058720665._2 | |
750 | - | $Tuple2((((((actions :+ listAction) :+ IntegerEntry(keyUserWlNftNumber(addr), (wlNftNumber + 1))) :+ IntegerEntry(keyWlNftTotalStaked, (valueOrElse(getInteger(keyWlNftTotalStaked), 0) + 1))) :+ IntegerEntry(keyStakedTimeByAssetIdAndOwner(assetIdStr, addr), lastBlock.timestamp)) ++ prologActions), wlgClaimedAmount) | |
751 | - | } | |
767 | + | let $t02073120921 = stakeNftInternal(addr, assetIdStr, (bonusByDescription(value(asset.description)) * 10000), keyUserWlNftNumber(addr), keyWlNftTotalStaked, MAX_WL_NFTS) | |
768 | + | let actions = $t02073120921._1 | |
769 | + | let wlgClaimedAmount = $t02073120921._2 | |
770 | + | $Tuple2(((prologActions ++ actions) :+ listAction), wlgClaimedAmount) | |
752 | 771 | } | |
753 | - | else { | |
754 | - | let arkimalName = isArkimalIssued(asset) | |
755 | - | if ((arkimalName == "")) | |
756 | - | then throw("Only WavesLands and Arkimals NFT tokens are accepted") | |
757 | - | else { | |
758 | - | let arkNftNumber = valueOrElse(getInteger(keyUserArkNftNumber(addr)), 0) | |
759 | - | if ((arkNftNumber >= MAX_ARK_NFTS)) | |
760 | - | then throw((("You can stake max " + toString(MAX_ARK_NFTS)) + " of Arkimals NFTs")) | |
761 | - | else { | |
762 | - | let $t02140021483 = stakeUnstakeAcresInternal(0, addr, ARK_NFT_BONUS) | |
763 | - | let actions = $t02140021483._1 | |
764 | - | let wlgClaimedAmount = $t02140021483._2 | |
765 | - | $Tuple2(((((actions :+ listAction) :+ IntegerEntry(keyUserArkNftNumber(addr), (arkNftNumber + 1))) :+ IntegerEntry(keyStakedTimeByAssetIdAndOwner(assetIdStr, addr), lastBlock.timestamp)) ++ prologActions), wlgClaimedAmount) | |
766 | - | } | |
767 | - | } | |
768 | - | } | |
772 | + | else if ((isArkimalIssued(asset) == "")) | |
773 | + | then throw("Only WavesLands and Arkimals NFT tokens are accepted") | |
774 | + | else { | |
775 | + | let $t02110221253 = stakeNftInternal(addr, assetIdStr, ARK_NFT_BONUS, keyUserArkNftNumber(addr), keyArkNftTotalStaked, MAX_ARK_NFTS) | |
776 | + | let actions = $t02110221253._1 | |
777 | + | let wlgClaimedAmount = $t02110221253._2 | |
778 | + | $Tuple2(((prologActions ++ actions) :+ listAction), wlgClaimedAmount) | |
779 | + | } | |
769 | 780 | } | |
770 | 781 | } | |
771 | 782 | } | |
800 | 811 | then { | |
801 | 812 | let wlNftNumber = valueOrElse(getInteger(keyUserWlNftNumber(addr)), 0) | |
802 | 813 | let bonusVal = (bonusByDescription(value(asset.description)) * 10000) | |
803 | - | let $ | |
804 | - | let actions = $ | |
805 | - | let wlgClaimedAmount = $ | |
814 | + | let $t02241822497 = stakeUnstakeAcresInternal(0, addr, -(bonusVal)) | |
815 | + | let actions = $t02241822497._1 | |
816 | + | let wlgClaimedAmount = $t02241822497._2 | |
806 | 817 | $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) | |
807 | 818 | } | |
808 | 819 | else { | |
811 | 822 | then throw("Only WavesLands and Arkimals NFT tokens are accepted") | |
812 | 823 | else { | |
813 | 824 | let arkNftNumber = valueOrElse(getInteger(keyUserArkNftNumber(addr)), 0) | |
814 | - | let $ | |
815 | - | let actions = $ | |
816 | - | let wlgClaimedAmount = $ | |
825 | + | let $t02315723241 = stakeUnstakeAcresInternal(0, addr, -(ARK_NFT_BONUS)) | |
826 | + | let actions = $t02315723241._1 | |
827 | + | let wlgClaimedAmount = $t02315723241._2 | |
817 | 828 | $Tuple2((((((actions :+ listAction) :+ IntegerEntry(keyUserArkNftNumber(addr), (arkNftNumber - 1))) :+ DeleteEntry(keyStakedTimeByAssetIdAndOwner(toBase58String(assetId), addr))) :+ ScriptTransfer(i.caller, 1, assetId)) ++ prologActions), wlgClaimedAmount) | |
818 | 829 | } | |
819 | 830 | } | |
848 | 859 | } | |
849 | 860 | } | |
850 | 861 | ||
851 | - | let $ | |
862 | + | let $t02438924468 = { | |
852 | 863 | let $l = i.payments | |
853 | 864 | let $s = size($l) | |
854 | 865 | let $acc0 = $Tuple3(0, 0, nil) | |
862 | 873 | ||
863 | 874 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
864 | 875 | } | |
865 | - | let usdtFee = $ | |
866 | - | let totalBonus = $ | |
867 | - | let burnActions = $ | |
876 | + | let usdtFee = $t02438924468._1 | |
877 | + | let totalBonus = $t02438924468._2 | |
878 | + | let burnActions = $t02438924468._3 | |
868 | 879 | let nftIndex = if ((totalBonus == 3)) | |
869 | 880 | then 2 | |
870 | 881 | else if ((totalBonus == 5)) | |
879 | 890 | let changeActions = if ((change > 0)) | |
880 | 891 | then [ScriptTransfer(i.caller, change, usdtAssetId)] | |
881 | 892 | else nil | |
882 | - | let $ | |
883 | - | let issueNftActions = $ | |
884 | - | let nftAssetId = $ | |
893 | + | let $t02492524997 = issueNFTinternal(nftIndex, i.caller) | |
894 | + | let issueNftActions = $t02492524997._1 | |
895 | + | let nftAssetId = $t02492524997._2 | |
885 | 896 | let burned = size(burnActions) | |
886 | 897 | let burnCounterActions = if ((burned == 0)) | |
887 | 898 | then nil |
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 | let keyNftTotalBurned = "nftTotalBurned" | |
207 | 207 | ||
208 | 208 | let keyWlNftTotalStaked = "WlNftTotalStaked" | |
209 | 209 | ||
210 | + | let keyArkNftTotalStaked = "ArkNftTotalStaked" | |
211 | + | ||
210 | 212 | func keyNftNumberByAssetId (assetId) = ("nftNumberByAssetId_" + assetId) | |
211 | 213 | ||
212 | 214 | ||
213 | 215 | func keyUserWlNftNumber (addr) = ("userWlNftNumber_" + addr) | |
214 | 216 | ||
215 | 217 | ||
216 | 218 | func keyUserArkNftNumber (addr) = ("userArkNftNumber_" + addr) | |
217 | 219 | ||
218 | 220 | ||
219 | 221 | func keyUserFullBonus (addr) = ("userFullBonus_" + addr) | |
220 | 222 | ||
221 | 223 | ||
222 | 224 | let levelAcres = [0, 10, 20, 40, 80, 150, 250, 400, 700, 1000] | |
223 | 225 | ||
224 | 226 | func getLevelByAcres (acres) = { | |
225 | 227 | let acr = ((acres + 99999999) / M8_) | |
226 | 228 | func checker (acc,item) = if ((item >= acr)) | |
227 | 229 | then acc | |
228 | 230 | else (acc + 1) | |
229 | 231 | ||
230 | 232 | let $l = levelAcres | |
231 | 233 | let $s = size($l) | |
232 | 234 | let $acc0 = 0 | |
233 | 235 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
234 | 236 | then $a | |
235 | 237 | else checker($a, $l[$i]) | |
236 | 238 | ||
237 | 239 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
238 | 240 | then $a | |
239 | 241 | else throw("List size exceeds 10") | |
240 | 242 | ||
241 | 243 | $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) | |
242 | 244 | } | |
243 | 245 | ||
244 | 246 | ||
245 | 247 | func getFarmingPowerByAcres (acres) = ((acres * 20) * (getLevelByAcres(acres) + 4)) | |
246 | 248 | ||
247 | 249 | ||
248 | 250 | func getFarmingPowerByAcresAndBonus (acres,bonus6) = { | |
249 | 251 | let notBonused = getFarmingPowerByAcres(acres) | |
250 | 252 | $Tuple2(fraction(notBonused, (M6_ + bonus6), M6_), notBonused) | |
251 | 253 | } | |
252 | 254 | ||
253 | 255 | ||
254 | 256 | func keyLastWlgTradeTimeByUser (addr) = ("lastArbTimeUser_" + addr) | |
255 | 257 | ||
256 | 258 | ||
257 | 259 | let keyLastAcresSellTime = "lastAcresSellTime" | |
258 | 260 | ||
259 | 261 | let keyLastLimitLeft = "lastLimitLeft" | |
260 | 262 | ||
261 | - | 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\"}"] | |
262 | - | ||
263 | 263 | let nftNames = ["SHOVEL-P3", "PICKAXE-C1", "PICKAXE-C3", "PICKAXE-C5", "PICKAXE-C10"] | |
264 | 264 | ||
265 | 265 | let contentKeys = ["contentShovelP3", "contentPickaxeC1", "contentPickaxeC3", "contentPickaxeC5", "contentPickaxeC10"] | |
266 | 266 | ||
267 | - | let URL = "\"url\": \"https://waveslands.com\", " | |
267 | + | let names = ["Gold shovel", "Pickaxe", "Pickaxe", "Pickaxe", "Pickaxe"] | |
268 | + | ||
269 | + | let descriptions = ["Reward for early birds", "Increases FarmPower", "Increases FarmPower", "Increases FarmPower", "Increases FarmPower"] | |
270 | + | ||
271 | + | let rarities = ["Promo", "Common", "Common", "Common", "Common"] | |
272 | + | ||
273 | + | let bonuses = [3, 1, 3, 5, 10] | |
268 | 274 | ||
269 | 275 | func prolog (i) = if (if ((i.originCaller != rest2Contract)) | |
270 | 276 | then valueOrElse(getBoolean(keyBlocked()), false) | |
271 | 277 | else false) | |
272 | 278 | then throw("Contracts are under maintenance") | |
273 | 279 | else { | |
274 | 280 | let addr = toString(i.originCaller) | |
275 | 281 | let week = (height / WEEK_BLOCKS) | |
276 | 282 | let lastWeekTxIdByUser = getString(keyLastWeekTxIdByUser(addr)) | |
277 | 283 | let txId = toBase58String(i.transactionId) | |
278 | 284 | let wtx = ((toString(week) + "_") + txId) | |
279 | 285 | if (isDefined(lastWeekTxIdByUser)) | |
280 | 286 | then { | |
281 | 287 | let lastWeekTx = split(value(lastWeekTxIdByUser), "_") | |
282 | 288 | if ((lastWeekTx[0] == toString(week))) | |
283 | 289 | then [StringEntry(keyLastWeekTxIdByUser(addr), wtx), StringEntry(keyCurWeekTxIdByUser(addr), wtx)] | |
284 | 290 | else if ((lastWeekTx[0] == toString((week - 1)))) | |
285 | 291 | then [StringEntry(keyCurWeekTxIdByUser(addr), wtx)] | |
286 | 292 | else { | |
287 | 293 | let curWeekTxIdByUser = getStringValue(keyLastWeekTxIdByUser(addr)) | |
288 | 294 | let curWeekTx = split(curWeekTxIdByUser, "_") | |
289 | 295 | if ((curWeekTx[0] == toString(week))) | |
290 | 296 | then [StringEntry(keyCurWeekTxIdByUser(addr), wtx)] | |
291 | 297 | else [StringEntry(keyLastWeekTxIdByUser(addr), curWeekTxIdByUser), StringEntry(keyCurWeekTxIdByUser(addr), wtx)] | |
292 | 298 | } | |
293 | 299 | } | |
294 | 300 | else [StringEntry(keyLastWeekTxIdByUser(addr), wtx), StringEntry(keyCurWeekTxIdByUser(addr), wtx)] | |
295 | 301 | } | |
296 | 302 | ||
297 | 303 | ||
304 | + | func createNftDescription (nftIndex,nftSerial) = ((((((((((((((((((((("{\"url\": \"https://waveslands.com\", " + "\"contentKey\": \"") + contentKeys[nftIndex]) + "\", ") + "\"number\": ") + nftSerial) + ", ") + "\"collection\": \"Digging tools") + "\", ") + "\"name\": \"") + names[nftIndex]) + "\", ") + "\"description\": \"") + descriptions[nftIndex]) + "\", ") + "\"rare\": \"") + rarities[nftIndex]) + "\", ") + "\"bonus\": ") + toString(bonuses[nftIndex])) + ", ") + "\"bonusType\": \"FarmPower\"}") | |
305 | + | ||
306 | + | ||
298 | 307 | func issueNFTinternal (nftIndex,addr) = if ((nftIndex >= size(contentKeys))) | |
299 | 308 | then throw("nftIndex out of bounds") | |
300 | 309 | else { | |
301 | 310 | let nftSerial = (valueOrElse(getInteger(keyNftTotalIssued), -1) + 1) | |
302 | - | let issue = Issue(nftNames[nftIndex], ( | |
311 | + | let issue = Issue(nftNames[nftIndex], createNftDescription(nftIndex, toString(nftSerial)), 1, 0, false) | |
303 | 312 | let nftAssetId = calculateAssetId(issue) | |
304 | - | $Tuple2([issue, IntegerEntry(keyNftTotalIssued, nftSerial), IntegerEntry(keyNftNumberByAssetId(toBase58String(nftAssetId)), nftSerial), ScriptTransfer(addr, 1, nftAssetId)], nftAssetId) | |
313 | + | $Tuple2([issue, IntegerEntry(keyNftTotalIssued, (nftSerial + 1)), IntegerEntry(keyNftNumberByAssetId(toBase58String(nftAssetId)), nftSerial), ScriptTransfer(addr, 1, nftAssetId)], nftAssetId) | |
305 | 314 | } | |
306 | 315 | ||
307 | 316 | ||
308 | 317 | func stakeUnstakeAcresInternal (amt,address,bonusDelta) = if (if ((amt == 0)) | |
309 | 318 | then (bonusDelta == 0) | |
310 | 319 | else false) | |
311 | 320 | then throw("Nothing to do") | |
312 | 321 | else { | |
313 | 322 | let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil) | |
314 | 323 | if ((wlgResult == wlgResult)) | |
315 | 324 | then { | |
316 | 325 | let now = lastBlock.timestamp | |
317 | 326 | let timeKey = keyAcresStakedTimeByUser(address) | |
318 | 327 | let amountKey = keyAcresStakedAmtByUser(address) | |
319 | 328 | let oldAcresAmount = valueOrElse(getInteger(amountKey), 0) | |
320 | 329 | if (if ((0 > amt)) | |
321 | 330 | then (0 > (oldAcresAmount + amt)) | |
322 | 331 | else false) | |
323 | 332 | then throw(((("You have only " + fixedPoint(oldAcresAmount, 8)) + " ACRES staked, tried to unstake ") + fixedPoint(-(amt), 8))) | |
324 | 333 | else { | |
325 | 334 | let newAcresAmount = (oldAcresAmount + amt) | |
326 | 335 | let oldTotal = valueOrElse(getInteger(acresStakdTotalKey), 0) | |
327 | 336 | let userFpKey = keyFarmingPowerByUser(address) | |
328 | 337 | let oldFp = valueOrElse(getInteger(userFpKey), 0) | |
329 | 338 | let bonusKey = keyUserFullBonus(address) | |
330 | 339 | let oldBonus = valueOrElse(getInteger(acres2Contract, bonusKey), 0) | |
331 | 340 | if (if ((0 > bonusDelta)) | |
332 | 341 | then (0 > (oldBonus + bonusDelta)) | |
333 | 342 | else false) | |
334 | 343 | then throw((((("You have only " + fixedPoint(oldBonus, 4)) + "% bonus, and tried to unstake ") + fixedPoint(-(bonusDelta), 4)) + "%")) | |
335 | 344 | else { | |
336 | - | let $ | |
337 | - | let newBonusedFp = $ | |
338 | - | let ignored = $ | |
345 | + | let $t057945893 = getFarmingPowerByAcresAndBonus(newAcresAmount, (oldBonus + bonusDelta)) | |
346 | + | let newBonusedFp = $t057945893._1 | |
347 | + | let ignored = $t057945893._2 | |
339 | 348 | let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0) | |
340 | 349 | let acresActions = if ((amt == 0)) | |
341 | 350 | then nil | |
342 | 351 | else [IntegerEntry(amountKey, newAcresAmount), IntegerEntry(acresStakdTotalKey, (oldTotal + amt))] | |
343 | 352 | $Tuple2(((((acresActions :+ IntegerEntry(timeKey, lastBlock.timestamp)) :+ IntegerEntry(userFpKey, newBonusedFp)) :+ IntegerEntry(totalFarmingPowerKey, ((oldTotalFp + newBonusedFp) - oldFp))) :+ IntegerEntry(bonusKey, (oldBonus + bonusDelta))), wlgResult) | |
344 | 353 | } | |
345 | 354 | } | |
346 | 355 | } | |
347 | 356 | else throw("Strict value is not equal to itself.") | |
348 | 357 | } | |
349 | 358 | ||
350 | 359 | ||
351 | 360 | func getWlgPrice (usdtBalanceCorrection) = { | |
352 | 361 | let issuedAmount = valueOrErrorMessage(getInteger(wlgContract, wlgIssuedAmtKey), "WLGOLD is not issued yet") | |
353 | 362 | let wlgUsd = assetBalance(wlgContract, usdtAssetId) | |
354 | 363 | let acres2Usd = (assetBalance(acres2Contract, usdtAssetId) - usdtBalanceCorrection) | |
355 | 364 | let investFundTotal = (assetBalance(investFundContract, usdtAssetId) + valueOrElse(getInteger(investFundContract, zbIssuedAmtKey), 0)) | |
356 | 365 | let totalFundsUsd = ((acres2Usd + wlgUsd) + investFundTotal) | |
357 | 366 | fraction(totalFundsUsd, MULT8, issuedAmount) | |
358 | 367 | } | |
359 | 368 | ||
360 | 369 | ||
361 | 370 | func getSwapLimitAcres () = { | |
362 | 371 | let wlgUsd = assetBalance(wlgContract, usdtAssetId) | |
363 | 372 | let acres2Usd = assetBalance(this, usdtAssetId) | |
364 | 373 | let investFundTotal = (assetBalance(investFundContract, usdtAssetId) + valueOrElse(getInteger(investFundContract, zbIssuedAmtKey), 0)) | |
365 | 374 | let defaultLimit = (((acres2Usd + wlgUsd) + investFundTotal) / ONE_PERCENT_DIVISOR) | |
366 | 375 | let lastLimitLeft = valueOrElse(getInteger(keyLastLimitLeft), defaultLimit) | |
367 | 376 | let lastTime = valueOrElse(getInteger(keyLastAcresSellTime), 0) | |
368 | 377 | let now = lastBlock.timestamp | |
369 | 378 | let currentLimit = (lastLimitLeft + fraction(defaultLimit, (now - lastTime), DAY_MILLIS)) | |
370 | 379 | let limitLeftUsdt = min([currentLimit, defaultLimit]) | |
371 | 380 | $Tuple2(IntegerEntry(keyLastAcresSellTime, now), limitLeftUsdt) | |
372 | 381 | } | |
373 | 382 | ||
374 | 383 | ||
375 | 384 | let arkOracle = addressFromStringValue("3PJgZ6AK1WVCpdCmEZpesHmaKvrQDdXG5og") | |
376 | 385 | ||
377 | 386 | let incubator = valueOrElse(getString(arkOracle, "static_incubatorAddress"), "") | |
378 | 387 | ||
379 | 388 | let breeder = valueOrElse(getString(arkOracle, "static_breederAddress"), "") | |
380 | 389 | ||
381 | 390 | let turtleIncubator = valueOrElse(getString(arkOracle, "static_turtleIncubatorAddress"), "") | |
382 | 391 | ||
383 | 392 | let turtleBreeder = valueOrElse(getString(arkOracle, "static_turtleBreederAddress"), "") | |
384 | 393 | ||
385 | 394 | let canineIncubator = valueOrElse(getString(arkOracle, "static_canineIncubatorAddress"), "") | |
386 | 395 | ||
387 | 396 | let canineBreeder = valueOrElse(getString(arkOracle, "static_canineBreederAddress"), "") | |
388 | 397 | ||
389 | 398 | let felineIncubator = valueOrElse(getString(arkOracle, "static_felineIncubatorAddress"), "") | |
390 | 399 | ||
391 | 400 | let felineBreeder = valueOrElse(getString(arkOracle, "static_felineBreederAddress"), "") | |
392 | 401 | ||
393 | 402 | let mutantBreeder = valueOrElse(getString(arkOracle, "static_mutantIncubatorAddress"), "") | |
394 | 403 | ||
395 | 404 | func isArkimalIssued (nfo) = { | |
396 | 405 | let issuer = toString(nfo.issuer) | |
397 | - | if (if (if (if (if (if (if (if ((issuer == incubator)) | |
406 | + | if (if (if (if (if (if (if (if (if (if ((chain == base58'2T')) | |
407 | + | then (issuer == oldStakingContractStr) | |
408 | + | else false) | |
409 | + | then true | |
410 | + | else (issuer == incubator)) | |
398 | 411 | then true | |
399 | 412 | else (issuer == breeder)) | |
400 | 413 | then true | |
401 | 414 | else (issuer == turtleIncubator)) | |
402 | 415 | then true | |
403 | 416 | else (issuer == turtleBreeder)) | |
404 | 417 | then true | |
405 | 418 | else (issuer == canineIncubator)) | |
406 | 419 | then true | |
407 | 420 | else (issuer == canineBreeder)) | |
408 | 421 | then true | |
409 | 422 | else (issuer == felineIncubator)) | |
410 | 423 | then true | |
411 | 424 | else (issuer == felineBreeder)) | |
412 | 425 | then nfo.name | |
413 | 426 | else if ((issuer == mutantBreeder)) | |
414 | 427 | then nfo.description | |
415 | 428 | else "" | |
416 | 429 | } | |
417 | 430 | ||
418 | 431 | ||
419 | 432 | func bonusByDescription (descr) = if (!(contains(descr, "\"bonusType\": \"FarmPower\""))) | |
420 | 433 | then throw(("NFT is not supported: " + descr)) | |
421 | 434 | else { | |
422 | 435 | let bonusStr = split_4C(split_4C(descr, "\"bonus\":")[1], ",")[0] | |
423 | 436 | parseIntValue(drop(bonusStr, (valueOrElse(lastIndexOf(bonusStr, " "), -1) + 1))) | |
424 | 437 | } | |
438 | + | ||
439 | + | ||
440 | + | func stakeNftInternal (addr,assetIdStr,bonus6,userNumKey,totalNumKey,limit) = { | |
441 | + | let nftNumber = valueOrElse(getInteger(userNumKey), 0) | |
442 | + | if ((nftNumber >= limit)) | |
443 | + | then throw((("You can stake max " + toString(limit)) + " of such NFTs")) | |
444 | + | else { | |
445 | + | let $t01040710483 = stakeUnstakeAcresInternal(0, addr, bonus6) | |
446 | + | let actions = $t01040710483._1 | |
447 | + | let wlgClaimedAmount = $t01040710483._2 | |
448 | + | $Tuple2((((actions :+ IntegerEntry(userNumKey, (nftNumber + 1))) :+ IntegerEntry(totalNumKey, (valueOrElse(getInteger(totalNumKey), 0) + 1))) :+ IntegerEntry(keyStakedTimeByAssetIdAndOwner(assetIdStr, addr), lastBlock.timestamp)), wlgClaimedAmount) | |
449 | + | } | |
450 | + | } | |
425 | 451 | ||
426 | 452 | ||
427 | 453 | @Callable(i) | |
428 | 454 | func saveLastTx () = if (!(containsElement([wlgContract], i.caller))) | |
429 | 455 | then throw("Access denied") | |
430 | 456 | else $Tuple2(prolog(i), 42) | |
431 | 457 | ||
432 | 458 | ||
433 | 459 | ||
434 | 460 | @Callable(i) | |
435 | 461 | func constructorV1 (rest2Addr,oldAcrContract) = if ((i.caller != this)) | |
436 | 462 | then throw("Permission denied") | |
437 | 463 | else { | |
438 | 464 | let oldAcrContAddr = addressFromStringValue(oldAcrContract) | |
439 | 465 | [IntegerEntry(acresIssuedAmountKey, getIntegerValue(oldAcrContAddr, acresIssuedAmountKey)), BinaryEntry(acresAssetIdKey, getBinaryValue(oldAcrContAddr, acresAssetIdKey)), StringEntry(keyRest2Address(), rest2Addr), StringEntry(oldAcresContractKey, oldAcrContract)] | |
440 | 466 | } | |
441 | 467 | ||
442 | 468 | ||
443 | 469 | ||
444 | 470 | @Callable(i) | |
445 | 471 | func setBlocked (isBlocked) = if ((i.caller != this)) | |
446 | 472 | then throw("permission denied") | |
447 | 473 | else [BooleanEntry(keyBlocked(), isBlocked)] | |
448 | 474 | ||
449 | 475 | ||
450 | 476 | ||
451 | 477 | @Callable(i) | |
452 | 478 | func unstakeAcres (amount) = { | |
453 | 479 | let prologActions = prolog(i) | |
454 | 480 | if ((0 >= amount)) | |
455 | 481 | then throw("Amount should be positive") | |
456 | 482 | else { | |
457 | 483 | let address = toString(i.caller) | |
458 | 484 | if ((size(i.payments) != 0)) | |
459 | 485 | then throw("No payments required") | |
460 | 486 | else { | |
461 | 487 | let arbReleaseTime = (valueOrElse(getInteger(wlgContract, keyLastWlgTradeTimeByUser(address)), 0) + arbitrageDelay) | |
462 | 488 | if ((arbReleaseTime > lastBlock.timestamp)) | |
463 | 489 | then throw(("You traded some WLGOLD, cannot unstake until " + toString(arbReleaseTime))) | |
464 | 490 | else { | |
465 | - | let $ | |
466 | - | let actions = $ | |
467 | - | let wlgClaimedAmount = $ | |
491 | + | let $t01205712137 = stakeUnstakeAcresInternal(-(amount), address, 0) | |
492 | + | let actions = $t01205712137._1 | |
493 | + | let wlgClaimedAmount = $t01205712137._2 | |
468 | 494 | $Tuple2(((actions :+ ScriptTransfer(i.caller, amount, acresAssetId)) ++ prologActions), wlgClaimedAmount) | |
469 | 495 | } | |
470 | 496 | } | |
471 | 497 | } | |
472 | 498 | } | |
473 | 499 | ||
474 | 500 | ||
475 | 501 | ||
476 | 502 | @Callable(i) | |
477 | 503 | func stakeAcres () = { | |
478 | 504 | let prologActions = prolog(i) | |
479 | 505 | let address = toString(i.caller) | |
480 | 506 | if ((size(i.payments) != 1)) | |
481 | 507 | then throw("exactly 1 payment must be attached") | |
482 | 508 | else { | |
483 | 509 | let pmt = i.payments[0] | |
484 | 510 | let amt = pmt.amount | |
485 | 511 | if (if (!(isDefined(pmt.assetId))) | |
486 | 512 | then true | |
487 | 513 | else (value(pmt.assetId) != acresAssetId)) | |
488 | 514 | then throw("ACRES payments only!") | |
489 | 515 | else { | |
490 | - | let $ | |
491 | - | let actions = $ | |
492 | - | let wlgClaimedAmount = $ | |
516 | + | let $t01258812664 = stakeUnstakeAcresInternal(amt, address, 0) | |
517 | + | let actions = $t01258812664._1 | |
518 | + | let wlgClaimedAmount = $t01258812664._2 | |
493 | 519 | $Tuple2((actions ++ prologActions), wlgClaimedAmount) | |
494 | 520 | } | |
495 | 521 | } | |
496 | 522 | } | |
497 | 523 | ||
498 | 524 | ||
499 | 525 | ||
500 | 526 | @Callable(i) | |
501 | 527 | func buyAcres () = { | |
502 | 528 | let prologActions = prolog(i) | |
503 | 529 | if ((size(i.payments) != 1)) | |
504 | 530 | then throw("exactly 1 payment must be attached") | |
505 | 531 | else { | |
506 | 532 | let pmt = i.payments[0] | |
507 | 533 | let usdtAmount = pmt.amount | |
508 | 534 | if (if (!(isDefined(pmt.assetId))) | |
509 | 535 | then true | |
510 | 536 | else (value(pmt.assetId) != usdtAssetId)) | |
511 | 537 | then throw("USDT payments only!") | |
512 | 538 | else if ((MULT6 > usdtAmount)) | |
513 | 539 | then throw((("Min payment should be " + fixedPoint(MULT6, 6)) + " USDT")) | |
514 | 540 | else { | |
515 | 541 | let acresAmount = (usdtAmount * USDT2ACRES_MULTIPLIER) | |
516 | 542 | let wlgAmount = fraction(usdtAmount, MULT8, getWlgPrice(usdtAmount)) | |
517 | 543 | let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey)) | |
518 | 544 | let req = invoke(oldAcresAddress, "requestAcresCallback", [acresAmount], nil) | |
519 | 545 | if ((req == req)) | |
520 | 546 | then { | |
521 | 547 | let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [wlgAmount], nil)) | |
522 | 548 | $Tuple2(([ScriptTransfer(i.caller, acresAmount, acresAssetId)] ++ prologActions), wlgRemain) | |
523 | 549 | } | |
524 | 550 | else throw("Strict value is not equal to itself.") | |
525 | 551 | } | |
526 | 552 | } | |
527 | 553 | } | |
528 | 554 | ||
529 | 555 | ||
530 | 556 | ||
531 | 557 | @Callable(i) | |
532 | 558 | func buyAcresREADONLY (usdtAmount) = { | |
533 | 559 | let acresAmount = (usdtAmount * USDT2ACRES_MULTIPLIER) | |
534 | 560 | let wlgToBurn = fraction(usdtAmount, MULT8, getWlgPrice(usdtAmount)) | |
535 | 561 | $Tuple2(nil, [acresAmount, MULT6, acresAmount, wlgToBurn]) | |
536 | 562 | } | |
537 | 563 | ||
538 | 564 | ||
539 | 565 | ||
540 | 566 | @Callable(i) | |
541 | 567 | func sellAcres () = { | |
542 | 568 | let prologActions = prolog(i) | |
543 | 569 | if ((size(i.payments) != 1)) | |
544 | 570 | then throw("exactly 1 payment must be attached") | |
545 | 571 | else { | |
546 | 572 | let pmt = i.payments[0] | |
547 | 573 | let acresAmount = pmt.amount | |
548 | 574 | if (if (!(isDefined(pmt.assetId))) | |
549 | 575 | then true | |
550 | 576 | else (value(pmt.assetId) != acresAssetId)) | |
551 | 577 | then throw("ACRES payments only!") | |
552 | 578 | else if ((MULT7 > acresAmount)) | |
553 | 579 | then throw((("Min payment should be " + fixedPoint(MULT7, 8)) + " ACRES")) | |
554 | 580 | else { | |
555 | 581 | let addr = toString(i.caller) | |
556 | - | let $ | |
557 | - | let limitAction = $ | |
558 | - | let maxUsdt = $ | |
582 | + | let $t01452114569 = getSwapLimitAcres() | |
583 | + | let limitAction = $t01452114569._1 | |
584 | + | let maxUsdt = $t01452114569._2 | |
559 | 585 | let maxAcres = (maxUsdt * USDT2ACRES_MULTIPLIER) | |
560 | 586 | if ((acresAmount > maxAcres)) | |
561 | 587 | then throw((("You can sell max " + fixedPoint(maxAcres, 8)) + " ACRES")) | |
562 | 588 | else { | |
563 | 589 | let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2) | |
564 | 590 | $Tuple2(([limitAction, IntegerEntry(keyLastLimitLeft, (maxUsdt - usdtAmount)), ScriptTransfer(i.caller, usdtAmount, usdtAssetId)] ++ prologActions), usdtAmount) | |
565 | 591 | } | |
566 | 592 | } | |
567 | 593 | } | |
568 | 594 | } | |
569 | 595 | ||
570 | 596 | ||
571 | 597 | ||
572 | 598 | @Callable(i) | |
573 | 599 | func sellAcresREADONLY (address,acresAmount) = { | |
574 | - | let $ | |
575 | - | let limitAction = $ | |
576 | - | let maxUsdt = $ | |
600 | + | let $t01506515113 = getSwapLimitAcres() | |
601 | + | let limitAction = $t01506515113._1 | |
602 | + | let maxUsdt = $t01506515113._2 | |
577 | 603 | let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2) | |
578 | 604 | $Tuple2(nil, [usdtAmount, MULT7, (maxUsdt * USDT2ACRES_MULTIPLIER), 0]) | |
579 | 605 | } | |
580 | 606 | ||
581 | 607 | ||
582 | 608 | ||
583 | 609 | @Callable(i) | |
584 | 610 | func convertOldStakes () = if ((i.caller != this)) | |
585 | 611 | then throw("Temporarily disabled") | |
586 | 612 | else { | |
587 | 613 | let address = toString(i.caller) | |
588 | 614 | if ((size(i.payments) != 0)) | |
589 | 615 | then throw("No payments required") | |
590 | 616 | else { | |
591 | 617 | let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey)) | |
592 | 618 | let amount = valueOrElse(getInteger(oldAcresAddress, keyAcresStakedAmtByUser(address)), 0) | |
593 | 619 | let gotAcres0 = if ((amount > 0)) | |
594 | 620 | then asTuple2Ints(invoke(oldAcresAddress, "unstakeAcresCallback", [amount, address], nil)) | |
595 | 621 | else $Tuple2(0, 0) | |
596 | 622 | let oldStakingAddress = addressFromStringValue(oldStakingContractStr) | |
597 | 623 | let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address)) | |
598 | 624 | let landsResult = if (isDefined(landsStr)) | |
599 | 625 | then { | |
600 | 626 | let lands = split_51C(value(landsStr), "_") | |
601 | 627 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
602 | 628 | then throw("landAssetId is required") | |
603 | 629 | else { | |
604 | 630 | let r = asTuple5Ints(invoke(oldStakingAddress, "unstakeLandCallback", [landAssetId, address], nil)) | |
605 | 631 | $Tuple4((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4)) | |
606 | 632 | } | |
607 | 633 | ||
608 | 634 | let rr = { | |
609 | 635 | let $l = lands | |
610 | 636 | let $s = size($l) | |
611 | 637 | let $acc0 = $Tuple4(0, 0, 0, 0) | |
612 | 638 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
613 | 639 | then $a | |
614 | 640 | else oneLand($a, $l[$i]) | |
615 | 641 | ||
616 | 642 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
617 | 643 | then $a | |
618 | 644 | else throw("List size exceeds 100") | |
619 | 645 | ||
620 | 646 | $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) | |
621 | 647 | } | |
622 | 648 | let finalize = invoke(oldStakingAddress, "unstakeLandsFinalizeCallback", [address], nil) | |
623 | 649 | if ((finalize == finalize)) | |
624 | 650 | then { | |
625 | 651 | let req = invoke(oldAcresAddress, "requestAcresCallback", [(((rr._1 + rr._2) + rr._3) + rr._4)], nil) | |
626 | 652 | if ((req == req)) | |
627 | 653 | then { | |
628 | - | let $ | |
629 | - | let nftActions = $ | |
630 | - | let nftAssetId = $ | |
654 | + | let $t01698217062 = issueNFTinternal(IdxDtx3PercConversion, i.caller) | |
655 | + | let nftActions = $t01698217062._1 | |
656 | + | let nftAssetId = $t01698217062._2 | |
631 | 657 | $Tuple5(rr._1, rr._2, rr._3, rr._4, nftActions) | |
632 | 658 | } | |
633 | 659 | else throw("Strict value is not equal to itself.") | |
634 | 660 | } | |
635 | 661 | else throw("Strict value is not equal to itself.") | |
636 | 662 | } | |
637 | 663 | else $Tuple5(0, 0, 0, 0, nil) | |
638 | 664 | let duckAssetId = valueOrElse(getString(oldStakingAddress, keyStakedDuckByOwner(address)), "") | |
639 | 665 | let duckResult = if ((duckAssetId != "")) | |
640 | 666 | then asTuple3Ints(invoke(oldStakingAddress, "unstakeDuckCallback", [duckAssetId, address], nil)) | |
641 | 667 | else $Tuple3(0, 0, 0) | |
642 | 668 | let x = stakeUnstakeAcresInternal((((((((gotAcres0._1 + landsResult._1) + landsResult._2) + landsResult._3) + landsResult._4) + duckResult._1) + duckResult._2) + duckResult._3), address, 0) | |
643 | 669 | $Tuple2((landsResult._5 ++ x._1), x._2) | |
644 | 670 | } | |
645 | 671 | } | |
646 | 672 | ||
647 | 673 | ||
648 | 674 | ||
649 | 675 | @Callable(i) | |
650 | 676 | func unstakeLandsREADONLY (address) = { | |
651 | 677 | let oldStakingAddress = addressFromStringValue(oldStakingContractStr) | |
652 | 678 | let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address)) | |
653 | 679 | let landsResult = if (isDefined(landsStr)) | |
654 | 680 | then { | |
655 | 681 | let lands = split_51C(value(landsStr), "_") | |
656 | 682 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
657 | 683 | then throw("landAssetId is required") | |
658 | 684 | else { | |
659 | 685 | let r = asTuple4Ints(invoke(oldStakingAddress, "unstakeLandREADONLY", [landAssetId, address], nil)) | |
660 | 686 | $Tuple4((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4)) | |
661 | 687 | } | |
662 | 688 | ||
663 | 689 | let $l = lands | |
664 | 690 | let $s = size($l) | |
665 | 691 | let $acc0 = $Tuple4(0, 0, 0, 0) | |
666 | 692 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
667 | 693 | then $a | |
668 | 694 | else oneLand($a, $l[$i]) | |
669 | 695 | ||
670 | 696 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
671 | 697 | then $a | |
672 | 698 | else throw("List size exceeds 100") | |
673 | 699 | ||
674 | 700 | $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) | |
675 | 701 | } | |
676 | 702 | else $Tuple4(0, 0, 0, 0) | |
677 | 703 | $Tuple2(nil, landsResult) | |
678 | 704 | } | |
679 | 705 | ||
680 | 706 | ||
681 | 707 | ||
682 | 708 | @Callable(i) | |
683 | 709 | func stakeAcresCallback (addr) = if ((i.caller != addressFromStringValue(oldStakingContractStr))) | |
684 | 710 | then throw("Permission denied") | |
685 | 711 | else stakeUnstakeAcresInternal(i.payments[0].amount, addr, 0) | |
686 | 712 | ||
687 | 713 | ||
688 | 714 | ||
689 | 715 | @Callable(i) | |
690 | 716 | func simulateStakeAcresREADONLY (address,addedAmount) = { | |
691 | 717 | let amountKey = keyAcresStakedAmtByUser(address) | |
692 | 718 | let newAcresAmount = (valueOrElse(getInteger(amountKey), 0) + addedAmount) | |
693 | 719 | let oldTotal = valueOrElse(getInteger(acresStakdTotalKey), 0) | |
694 | 720 | let userFpKey = keyFarmingPowerByUser(address) | |
695 | 721 | let oldFp = valueOrElse(getInteger(userFpKey), 0) | |
696 | 722 | let userBonus = valueOrElse(getInteger(acres2Contract, keyUserFullBonus(address)), 0) | |
697 | - | let $ | |
698 | - | let newBonusedFp = $ | |
699 | - | let ignored = $ | |
723 | + | let $t01922719314 = getFarmingPowerByAcresAndBonus(newAcresAmount, userBonus) | |
724 | + | let newBonusedFp = $t01922719314._1 | |
725 | + | let ignored = $t01922719314._2 | |
700 | 726 | let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0) | |
701 | 727 | let newTotalFp = ((oldTotalFp + newBonusedFp) - oldFp) | |
702 | 728 | $Tuple2(nil, [oldFp, newBonusedFp, oldTotalFp, newTotalFp]) | |
703 | 729 | } | |
704 | 730 | ||
705 | 731 | ||
706 | 732 | ||
707 | 733 | @Callable(i) | |
708 | 734 | func issueNFT (forAddress,nftIndex) = if ((i.caller != wlgContract)) | |
709 | 735 | then throw("Permission denied") | |
710 | 736 | else issueNFTinternal(nftIndex, addressFromStringValue(forAddress)) | |
711 | 737 | ||
712 | 738 | ||
713 | 739 | ||
714 | 740 | @Callable(i) | |
715 | 741 | func stakeNFT () = { | |
716 | 742 | let prologActions = prolog(i) | |
717 | 743 | if ((size(i.payments) != 1)) | |
718 | 744 | then throw("Exactly one payment required") | |
719 | 745 | else { | |
720 | 746 | let pmt = value(i.payments[0]) | |
721 | 747 | if ((pmt.amount != 1)) | |
722 | 748 | then throw("NFT token should be attached as payment") | |
723 | 749 | else { | |
724 | 750 | let assetId = value(pmt.assetId) | |
725 | 751 | let asset = value(assetInfo(assetId)) | |
726 | 752 | let assetIdStr = toBase58String(assetId) | |
727 | 753 | let addr = toString(i.caller) | |
728 | 754 | let nftsKey = keyStakedNFTsByOwner(addr) | |
729 | 755 | let nftsStr = getString(nftsKey) | |
730 | 756 | let nfts = if (isDefined(nftsStr)) | |
731 | 757 | then split_4C(value(nftsStr), "_") | |
732 | 758 | else nil | |
733 | 759 | if (containsElement(nfts, assetIdStr)) | |
734 | 760 | then throw(("Your staked NFTs already contain " + assetIdStr)) | |
735 | 761 | else if ((size(nfts) >= MAX_NFTS_STAKED_BY_USER)) | |
736 | 762 | then throw((("Your already staked max (" + toString(MAX_NFTS_STAKED_BY_USER)) + ") NFTs")) | |
737 | 763 | else { | |
738 | 764 | let listAction = StringEntry(nftsKey, makeString_2C((nfts :+ assetIdStr), "_")) | |
739 | - | let isWL = (asset.issuer == this) | |
740 | - | if (isWL) | |
765 | + | if ((asset.issuer == this)) | |
741 | 766 | then { | |
742 | - | let wlNftNumber = valueOrElse(getInteger(keyUserWlNftNumber(addr)), 0) | |
743 | - | if ((wlNftNumber >= MAX_WL_NFTS)) | |
744 | - | then throw((("You can stake max " + toString(MAX_WL_NFTS)) + " of WavesLands NFTs")) | |
745 | - | else { | |
746 | - | let bonusVal = (bonusByDescription(value(asset.description)) * 10000) | |
747 | - | let $t02058720665 = stakeUnstakeAcresInternal(0, addr, bonusVal) | |
748 | - | let actions = $t02058720665._1 | |
749 | - | let wlgClaimedAmount = $t02058720665._2 | |
750 | - | $Tuple2((((((actions :+ listAction) :+ IntegerEntry(keyUserWlNftNumber(addr), (wlNftNumber + 1))) :+ IntegerEntry(keyWlNftTotalStaked, (valueOrElse(getInteger(keyWlNftTotalStaked), 0) + 1))) :+ IntegerEntry(keyStakedTimeByAssetIdAndOwner(assetIdStr, addr), lastBlock.timestamp)) ++ prologActions), wlgClaimedAmount) | |
751 | - | } | |
767 | + | let $t02073120921 = stakeNftInternal(addr, assetIdStr, (bonusByDescription(value(asset.description)) * 10000), keyUserWlNftNumber(addr), keyWlNftTotalStaked, MAX_WL_NFTS) | |
768 | + | let actions = $t02073120921._1 | |
769 | + | let wlgClaimedAmount = $t02073120921._2 | |
770 | + | $Tuple2(((prologActions ++ actions) :+ listAction), wlgClaimedAmount) | |
752 | 771 | } | |
753 | - | else { | |
754 | - | let arkimalName = isArkimalIssued(asset) | |
755 | - | if ((arkimalName == "")) | |
756 | - | then throw("Only WavesLands and Arkimals NFT tokens are accepted") | |
757 | - | else { | |
758 | - | let arkNftNumber = valueOrElse(getInteger(keyUserArkNftNumber(addr)), 0) | |
759 | - | if ((arkNftNumber >= MAX_ARK_NFTS)) | |
760 | - | then throw((("You can stake max " + toString(MAX_ARK_NFTS)) + " of Arkimals NFTs")) | |
761 | - | else { | |
762 | - | let $t02140021483 = stakeUnstakeAcresInternal(0, addr, ARK_NFT_BONUS) | |
763 | - | let actions = $t02140021483._1 | |
764 | - | let wlgClaimedAmount = $t02140021483._2 | |
765 | - | $Tuple2(((((actions :+ listAction) :+ IntegerEntry(keyUserArkNftNumber(addr), (arkNftNumber + 1))) :+ IntegerEntry(keyStakedTimeByAssetIdAndOwner(assetIdStr, addr), lastBlock.timestamp)) ++ prologActions), wlgClaimedAmount) | |
766 | - | } | |
767 | - | } | |
768 | - | } | |
772 | + | else if ((isArkimalIssued(asset) == "")) | |
773 | + | then throw("Only WavesLands and Arkimals NFT tokens are accepted") | |
774 | + | else { | |
775 | + | let $t02110221253 = stakeNftInternal(addr, assetIdStr, ARK_NFT_BONUS, keyUserArkNftNumber(addr), keyArkNftTotalStaked, MAX_ARK_NFTS) | |
776 | + | let actions = $t02110221253._1 | |
777 | + | let wlgClaimedAmount = $t02110221253._2 | |
778 | + | $Tuple2(((prologActions ++ actions) :+ listAction), wlgClaimedAmount) | |
779 | + | } | |
769 | 780 | } | |
770 | 781 | } | |
771 | 782 | } | |
772 | 783 | } | |
773 | 784 | ||
774 | 785 | ||
775 | 786 | ||
776 | 787 | @Callable(i) | |
777 | 788 | func unstakeNFT (assetIdStr) = { | |
778 | 789 | let prologActions = prolog(i) | |
779 | 790 | if ((size(i.payments) != 0)) | |
780 | 791 | then throw("No payments required") | |
781 | 792 | else { | |
782 | 793 | let assetId = fromBase58String(assetIdStr) | |
783 | 794 | let addr = toString(i.caller) | |
784 | 795 | let asset = value(assetInfo(assetId)) | |
785 | 796 | let timeKey = keyStakedTimeByAssetIdAndOwner(assetIdStr, addr) | |
786 | 797 | if (!(isDefined(getInteger(timeKey)))) | |
787 | 798 | then throw((("NFT " + asset.name) + " is not staked by you")) | |
788 | 799 | else { | |
789 | 800 | let nftsKey = keyStakedNFTsByOwner(addr) | |
790 | 801 | let nfts = split_4C(valueOrElse(getString(nftsKey), ""), "_") | |
791 | 802 | let idx = indexOf(nfts, assetIdStr) | |
792 | 803 | if (!(isDefined(idx))) | |
793 | 804 | then throw(("Your staked NFTs don't contain " + assetIdStr)) | |
794 | 805 | else { | |
795 | 806 | let listAction = if ((size(nfts) > 1)) | |
796 | 807 | then StringEntry(nftsKey, makeString_2C(removeByIndex(nfts, value(idx)), "_")) | |
797 | 808 | else DeleteEntry(nftsKey) | |
798 | 809 | let isWL = (asset.issuer == this) | |
799 | 810 | if (isWL) | |
800 | 811 | then { | |
801 | 812 | let wlNftNumber = valueOrElse(getInteger(keyUserWlNftNumber(addr)), 0) | |
802 | 813 | let bonusVal = (bonusByDescription(value(asset.description)) * 10000) | |
803 | - | let $ | |
804 | - | let actions = $ | |
805 | - | let wlgClaimedAmount = $ | |
814 | + | let $t02241822497 = stakeUnstakeAcresInternal(0, addr, -(bonusVal)) | |
815 | + | let actions = $t02241822497._1 | |
816 | + | let wlgClaimedAmount = $t02241822497._2 | |
806 | 817 | $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) | |
807 | 818 | } | |
808 | 819 | else { | |
809 | 820 | let arkimalName = isArkimalIssued(asset) | |
810 | 821 | if ((arkimalName == "")) | |
811 | 822 | then throw("Only WavesLands and Arkimals NFT tokens are accepted") | |
812 | 823 | else { | |
813 | 824 | let arkNftNumber = valueOrElse(getInteger(keyUserArkNftNumber(addr)), 0) | |
814 | - | let $ | |
815 | - | let actions = $ | |
816 | - | let wlgClaimedAmount = $ | |
825 | + | let $t02315723241 = stakeUnstakeAcresInternal(0, addr, -(ARK_NFT_BONUS)) | |
826 | + | let actions = $t02315723241._1 | |
827 | + | let wlgClaimedAmount = $t02315723241._2 | |
817 | 828 | $Tuple2((((((actions :+ listAction) :+ IntegerEntry(keyUserArkNftNumber(addr), (arkNftNumber - 1))) :+ DeleteEntry(keyStakedTimeByAssetIdAndOwner(toBase58String(assetId), addr))) :+ ScriptTransfer(i.caller, 1, assetId)) ++ prologActions), wlgClaimedAmount) | |
818 | 829 | } | |
819 | 830 | } | |
820 | 831 | } | |
821 | 832 | } | |
822 | 833 | } | |
823 | 834 | } | |
824 | 835 | ||
825 | 836 | ||
826 | 837 | ||
827 | 838 | @Callable(i) | |
828 | 839 | func exchangeNFTs () = { | |
829 | 840 | let prologActions = prolog(i) | |
830 | 841 | if ((3 > size(i.payments))) | |
831 | 842 | then throw("Min one USDT and 2 NFT payments allowed") | |
832 | 843 | else if ((size(i.payments) > 6)) | |
833 | 844 | then throw("Max one USDT and 5 NFT payments allowed") | |
834 | 845 | else { | |
835 | 846 | let addr = toString(i.caller) | |
836 | 847 | func addUp (acc,pmt) = { | |
837 | 848 | let assetId = valueOrErrorMessage(pmt.assetId, "WAVES payments not allowed") | |
838 | 849 | if ((assetId == usdtAssetId)) | |
839 | 850 | then $Tuple3((acc._1 + pmt.amount), acc._2, acc._3) | |
840 | 851 | else { | |
841 | 852 | let asset = value(assetInfo(assetId)) | |
842 | 853 | if ((asset.issuer != this)) | |
843 | 854 | then throw("Only WL-issued NFTs allowed") | |
844 | 855 | else { | |
845 | 856 | let bonusPerc = bonusByDescription(value(asset.description)) | |
846 | 857 | $Tuple3(acc._1, (acc._2 + bonusPerc), (acc._3 :+ Burn(assetId, 1))) | |
847 | 858 | } | |
848 | 859 | } | |
849 | 860 | } | |
850 | 861 | ||
851 | - | let $ | |
862 | + | let $t02438924468 = { | |
852 | 863 | let $l = i.payments | |
853 | 864 | let $s = size($l) | |
854 | 865 | let $acc0 = $Tuple3(0, 0, nil) | |
855 | 866 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
856 | 867 | then $a | |
857 | 868 | else addUp($a, $l[$i]) | |
858 | 869 | ||
859 | 870 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
860 | 871 | then $a | |
861 | 872 | else throw("List size exceeds 6") | |
862 | 873 | ||
863 | 874 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
864 | 875 | } | |
865 | - | let usdtFee = $ | |
866 | - | let totalBonus = $ | |
867 | - | let burnActions = $ | |
876 | + | let usdtFee = $t02438924468._1 | |
877 | + | let totalBonus = $t02438924468._2 | |
878 | + | let burnActions = $t02438924468._3 | |
868 | 879 | let nftIndex = if ((totalBonus == 3)) | |
869 | 880 | then 2 | |
870 | 881 | else if ((totalBonus == 5)) | |
871 | 882 | then 3 | |
872 | 883 | else if ((totalBonus == 10)) | |
873 | 884 | then 4 | |
874 | 885 | else throw("Only bonuses of 3%, 5% or 10% are supported") | |
875 | 886 | let change = (usdtFee - (totalBonus * MULT6)) | |
876 | 887 | if ((0 > change)) | |
877 | 888 | then throw((("You need to attach " + toString(totalBonus)) + " USDT as fee")) | |
878 | 889 | else { | |
879 | 890 | let changeActions = if ((change > 0)) | |
880 | 891 | then [ScriptTransfer(i.caller, change, usdtAssetId)] | |
881 | 892 | else nil | |
882 | - | let $ | |
883 | - | let issueNftActions = $ | |
884 | - | let nftAssetId = $ | |
893 | + | let $t02492524997 = issueNFTinternal(nftIndex, i.caller) | |
894 | + | let issueNftActions = $t02492524997._1 | |
895 | + | let nftAssetId = $t02492524997._2 | |
885 | 896 | let burned = size(burnActions) | |
886 | 897 | let burnCounterActions = if ((burned == 0)) | |
887 | 898 | then nil | |
888 | 899 | else [IntegerEntry(keyNftTotalBurned, (valueOrElse(getInteger(keyNftTotalBurned), 0) + burned))] | |
889 | 900 | $Tuple2(((((issueNftActions ++ burnActions) ++ burnCounterActions) ++ prologActions) ++ changeActions), nftAssetId) | |
890 | 901 | } | |
891 | 902 | } | |
892 | 903 | } | |
893 | 904 | ||
894 | 905 |
github/deemru/w8io/026f985 289.84 ms ◑