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