tx · 5hYXzNHpujRezK3uX59EtuPTNcfmz1g94C1gPvpVR763 3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm: -0.03100000 Waves 2023.01.17 14:37 [2408879] smart account 3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm > SELF 0.00000000 Waves
{ "type": 13, "id": "5hYXzNHpujRezK3uX59EtuPTNcfmz1g94C1gPvpVR763", "fee": 3100000, "feeAssetId": null, "timestamp": 1673955453662, "version": 2, "chainId": 84, "sender": "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm", "senderPublicKey": "EVooykMNV691Venwp1dHUTBd7KWequzUcda57Wd3LQEX", "proofs": [ "2FLHzysA4hsoWuUQtP5nqpaiEgyCQ2fzJzu4Dytp8VqorWmjX2SMkNNpCiah4PnTxrHM7WemKHkEbwJvbZdFMYYc" ], "script": "base64:BgJTCAISABIDCgEIEgASAwoBCBIECgIBCBIECgICAhIECgIBCBIECgIBARIECgIICBIECgICAhIECgICAhIDCgEIEgMKAQgSAwoBCBIDCgEYEgMKARhcAAVjaGFpbgkAsAkBCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAAt1c2RuQXNzZXRJZAQHJG1hdGNoMAUFY2hhaW4DCQAAAgIBVwUHJG1hdGNoMAEgtiYpwwT1zlORpA5LdSQvZIxRsfrfr1QpvUjSHSqyqtEDCQAAAgIBVAUHJG1hdGNoMAEg93bq9/eDymXbbhPuAjvPWCmVqcHRjfJL2mzYHWKAyN4JAAIBAg1Vbmtub3duIGNoYWluAA1pbmN1YmF0b3JBZGRyBAckbWF0Y2gwBQVjaGFpbgMJAAACAgFXBQckbWF0Y2gwCQERQGV4dHJOYXRpdmUoMTA2MikBAiMzUEVrdFZ1eDJSaGNoU042M0RzRG80YjRtejRRcXpLU2VEdgMJAAACAgFUBQckbWF0Y2gwBQR0aGlzCQACAQINVW5rbm93biBjaGFpbgALYnJlZWRlckFkZHIEByRtYXRjaDAFBWNoYWluAwkAAAICAVcFByRtYXRjaDA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aXJlIGFueSBwYXltZW50cwQGcmVzdWx0BAckbWF0Y2gwBQdhcnROYW1lAwkAAAICB1BSRVNBTEUFByRtYXRjaDAJARJhY3RpdmF0ZVByZXNhbGVBcnQBCQClCAEIBQFpBmNhbGxlcgkAAgECEFVua25vd24gYXJ0aWZhY3QFBnJlc3VsdAFpAQptZXJnZUxhbmRzAQxsYW5kQXNzZXRJZHMDCQECIT0CCQCQAwEIBQFpCHBheW1lbnRzAAAJAAIBAipMYW5kcyBtZXJnaW5nIGRvZXNuJ3QgcmVxdWlyZSBhbnkgcGF5bWVudHMJAQttZXJnZUNvbW1vbgUGCQClCAEIBQFpBmNhbGxlcgAABQxsYW5kQXNzZXRJZHMIBQFpDXRyYW5zYWN0aW9uSWQBaQEObWVyZ2VMYW5kc1VzZG4BDGxhbmRBc3NldElkcwMJAQIhPQIJAJADAQgFAWkIcGF5bWVudHMAAQkAAgECHEV4YWN0bHkgb25lIHBheW1lbnQgcmVxdWlyZWQEA3BtdAkBBXZhbHVlAQkAkQMCCAUBaQhwYXltZW50cwAAAwkBAiE9AggFA3BtdAdhc3NldElkBQt1c2RuQXNzZXRJZAkAAgECGkFsbG93ZWQgVVNETiBwYXltZW50IG9ubHkhBAZyZXN1bHQJAQttZXJnZUNvbW1vbgUHCQClCAEIBQFpBmNhbGxlcggFA3BtdAZhbW91bnQFDGxhbmRBc3NldElkcwgFAWkNdHJhbnNhY3Rpb25JZAkAlAoCCQDNCAIIBQZyZXN1bHQCXzEJAQ5TY3JpcHRUcmFuc2ZlcgMFC2Vjb25vbXlBZGRyCAUDcG10BmFtb3VudAULdXNkbkFzc2V0SWQIBQZyZXN1bHQCXzIAitoKeg==", "height": 2408879, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CSj2Lang9fny8wCZJy3ynqzQ5f1sJkfxXAFwqzFjQX6v Next: 9Sd9fKnJy22Q6qdjKALnRW5DMrLQZSXSp1rnJeVj6gbc Diff:
Old | New | Differences | |
---|---|---|---|
50 | 50 | let DEFAULTLOCATION = "Africa_F_Africa" | |
51 | 51 | ||
52 | 52 | let NUMRES = 6 | |
53 | + | ||
54 | + | let SSIZE = 25 | |
55 | + | ||
56 | + | let MSIZE = 100 | |
57 | + | ||
58 | + | let LSIZE = 225 | |
59 | + | ||
60 | + | let XLSIZE = 400 | |
61 | + | ||
62 | + | let XXLSIZE = 625 | |
53 | 63 | ||
54 | 64 | let DAILYRESBYPIECE = 3456000 | |
55 | 65 | ||
114 | 124 | let continents = ["Asia", "Europe", "Americas", "Oceania", "Africa"] | |
115 | 125 | ||
116 | 126 | let ARTPRESALE = "PRESALE" | |
127 | + | ||
128 | + | let PRESALENUMLANDS = 500 | |
117 | 129 | ||
118 | 130 | func keyNextFreeLandNum () = "nextLandNum" | |
119 | 131 | ||
300 | 312 | func numPiecesBySize (landSize) = match landSize { | |
301 | 313 | case _ => | |
302 | 314 | if (("S" == $match0)) | |
303 | - | then | |
315 | + | then SSIZE | |
304 | 316 | else if (("M" == $match0)) | |
305 | - | then | |
317 | + | then MSIZE | |
306 | 318 | else if (("L" == $match0)) | |
307 | - | then | |
319 | + | then LSIZE | |
308 | 320 | else if (("XL" == $match0)) | |
309 | - | then | |
321 | + | then XLSIZE | |
310 | 322 | else if (("XXL" == $match0)) | |
311 | - | then | |
323 | + | then XXLSIZE | |
312 | 324 | else throw("Unknown land size") | |
313 | 325 | } | |
314 | 326 | ||
452 | 464 | let mList = split(currentPack[bpIdxMat], "_") | |
453 | 465 | let newMat = makeString(subtractMaterials(shouldUseMat, mList, EXPMATERIALS), "_") | |
454 | 466 | let bigNum = abs(toBigInt(txId)) | |
455 | - | let freeNum = valueOrElse(getInteger(keyNextFreeLandNum()), | |
467 | + | let freeNum = valueOrElse(getInteger(keyNextFreeLandNum()), (PRESALENUMLANDS + 1)) | |
456 | 468 | let landNum = toString(freeNum) | |
457 | 469 | let continentIdx = toInt((bigNum % FIVEX)) | |
458 | 470 | let terrains = genTerrains(bigNum, continentIdx) | |
486 | 498 | let landAssetId = loc[locIdxId] | |
487 | 499 | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
488 | 500 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
489 | - | let savedTime = valueOrErrorMessage(getInteger(timeKey), ((" | |
501 | + | let savedTime = valueOrErrorMessage(getInteger(timeKey), (("Your duck is on " + asset.name) + ", which is not staked")) | |
490 | 502 | let owner = valueOrErrorMessage(getString(keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned")) | |
491 | 503 | if ((owner != addr)) | |
492 | 504 | then throw((LANDPREFIX + " is not yours")) | |
498 | 510 | } | |
499 | 511 | ||
500 | 512 | ||
501 | - | func claimResInternal (addr,amount) = { | |
502 | - | let c = checkClaimConditions(addr) | |
503 | - | let landSize = c._3[recLandSize] | |
504 | - | let terrainCounts = countTerrains(c._3[recTerrains]) | |
505 | - | let deltaTime = (lastBlock.timestamp - c._4) | |
506 | - | if ((0 > deltaTime)) | |
507 | - | then throw(((("Saved timestamp is in future, saved = " + toString(c._4)) + ", current = ") + toString(lastBlock.timestamp))) | |
508 | - | else { | |
509 | - | let pieces = numPiecesBySize(landSize) | |
510 | - | let dailyProductionByPiece = applyBonuses(c._2, pieces) | |
511 | - | let availRes = fraction(deltaTime, (dailyProductionByPiece * pieces), DAYMILLIS) | |
512 | - | if ((amount > availRes)) | |
513 | - | then throw(((("Not enough resources, available = " + toString(availRes)) + ", requested = ") + toString(amount))) | |
514 | - | else { | |
515 | - | let newDeltaTime = fraction((availRes - amount), DAYMILLIS, (dailyProductionByPiece * pieces)) | |
516 | - | let newTimestamp = (lastBlock.timestamp - newDeltaTime) | |
517 | - | let bpKey = keyBackpackByDuck(c._1) | |
518 | - | let currentPack = getBackpack(bpKey) | |
519 | - | let currentRes = split(currentPack[bpIdxRes], "_") | |
520 | - | let bpRes = addRes(currentRes, terrainCounts, (deltaTime - newDeltaTime), (pieces / 25), dailyProductionByPiece) | |
521 | - | $Tuple3([IntegerEntry(keyStakedTimeByAssetId(c._2), newTimestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, c._2, addr), newTimestamp)], bpKey, [currentPack[bpIdxLevel], bpRes, currentPack[bpIdxMat], currentPack[bpIdxProd]]) | |
522 | - | } | |
523 | - | } | |
524 | - | } | |
513 | + | func claimResInternal (addr,amount) = if ((0 > amount)) | |
514 | + | then throw("Negative amount") | |
515 | + | else { | |
516 | + | let c = checkClaimConditions(addr) | |
517 | + | let landSize = c._3[recLandSize] | |
518 | + | let terrainCounts = countTerrains(c._3[recTerrains]) | |
519 | + | let deltaTime = (lastBlock.timestamp - c._4) | |
520 | + | if ((0 > deltaTime)) | |
521 | + | then throw(((("Saved timestamp is in future, saved = " + toString(c._4)) + ", current = ") + toString(lastBlock.timestamp))) | |
522 | + | else { | |
523 | + | let pieces = numPiecesBySize(landSize) | |
524 | + | let dailyProductionByPiece = applyBonuses(c._2, pieces) | |
525 | + | let availRes = fraction(deltaTime, (dailyProductionByPiece * pieces), DAYMILLIS) | |
526 | + | if ((amount > availRes)) | |
527 | + | then throw(((("Not enough resources, available = " + toString(availRes)) + ", requested = ") + toString(amount))) | |
528 | + | else { | |
529 | + | let newDeltaTime = fraction((availRes - amount), DAYMILLIS, (dailyProductionByPiece * pieces)) | |
530 | + | let newTimestamp = (lastBlock.timestamp - newDeltaTime) | |
531 | + | let bpKey = keyBackpackByDuck(c._1) | |
532 | + | let currentPack = getBackpack(bpKey) | |
533 | + | let currentRes = split(currentPack[bpIdxRes], "_") | |
534 | + | let bpRes = addRes(currentRes, terrainCounts, (deltaTime - newDeltaTime), (pieces / SSIZE), dailyProductionByPiece) | |
535 | + | $Tuple3([IntegerEntry(keyStakedTimeByAssetId(c._2), newTimestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, c._2, addr), newTimestamp)], bpKey, [currentPack[bpIdxLevel], bpRes, currentPack[bpIdxMat], currentPack[bpIdxProd]]) | |
536 | + | } | |
537 | + | } | |
538 | + | } | |
525 | 539 | ||
526 | 540 | ||
527 | 541 | func claimAll (addr,landAssetId,pieces) = { | |
542 | 556 | then throw("Currently max infrastructure level = 3") | |
543 | 557 | else { | |
544 | 558 | let newLevel = (curLevel + 1) | |
545 | - | let cost = fraction(InfraUpgradeCostSUsdn, (pieces * newLevel), | |
559 | + | let cost = fraction(InfraUpgradeCostSUsdn, (pieces * newLevel), SSIZE) | |
546 | 560 | if (if (!(shouldUseMat)) | |
547 | 561 | then (paymentAmount != cost) | |
548 | 562 | else false) | |
551 | 565 | let bpKey = keyBackpackByDuck(c._1) | |
552 | 566 | let currentPack = getBackpack(bpKey) | |
553 | 567 | let mList = split(currentPack[bpIdxMat], "_") | |
554 | - | let newMat = makeString(subtractMaterials(shouldUseMat, mList, fraction(InfraUpgradeCostS, (pieces * newLevel), | |
568 | + | let newMat = makeString(subtractMaterials(shouldUseMat, mList, fraction(InfraUpgradeCostS, (pieces * newLevel), SSIZE)), "_") | |
555 | 569 | let claimResult = claimAll(addr, c._2, pieces) | |
556 | 570 | $Tuple2(([IntegerEntry(infraKey, newLevel), IntegerEntry(keyInfraLevelByAssetIdAndOwner(c._2, addr), newLevel), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], claimResult._3[bpIdxRes], newMat, currentPack[bpIdxProd]], ":"))] ++ claimResult._1), newLevel) | |
557 | 571 | } | |
565 | 579 | let activationKey = keyPresaleArtActivatedByAssetId(landAssetId) | |
566 | 580 | if (valueOrElse(getBoolean(activationKey), false)) | |
567 | 581 | then throw("Presale artifact is already activated") | |
568 | - | else if ((parseIntValue(c._3[recLandNum]) > | |
582 | + | else if ((parseIntValue(c._3[recLandNum]) > PRESALENUMLANDS)) | |
569 | 583 | then throw((((LANDPREFIX + " ") + landAssetId) + " is not eligible for presale artifact")) | |
570 | 584 | else { | |
571 | 585 | let pieces = numPiecesBySize(c._3[recLandSize]) | |
623 | 637 | then throw(((("Saved timestamp is in future, saved = " + toString(savedTime)) + ", current = ") + toString(lastBlock.timestamp))) | |
624 | 638 | else { | |
625 | 639 | let dailyProductionByPiece = applyBonuses(landAssetId, pieces) | |
626 | - | let bpRes = addRes(split(acc._4, "_"), terrainCounts, deltaTime, (pieces / | |
627 | - | let props = updateProportionsInternal(split(acc._6, "_"), terrainCounts, (pieces / | |
640 | + | let bpRes = addRes(split(acc._4, "_"), terrainCounts, deltaTime, (pieces / SSIZE), dailyProductionByPiece) | |
641 | + | let props = updateProportionsInternal(split(acc._6, "_"), terrainCounts, (pieces / SSIZE), -1) | |
628 | 642 | $Tuple6(sizesOut, arts, continent, bpRes, (((((((((((((acc._5 :+ DeleteEntry(keyStakedTimeByAssetId(landAssetId))) :+ DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, addr))) :+ DeleteEntry(keyLandToAssetId(landNum))) :+ DeleteEntry(keyNftName(landNum, landSize))) :+ DeleteEntry(keyLandAssetIdToOwner(landAssetId))) :+ DeleteEntry(keyInfraLevelByAssetId(landAssetId))) :+ DeleteEntry(keyInfraLevelByAssetIdAndOwner(landAssetId, addr))) :+ DeleteEntry(keyPresaleArtActivatedByAssetId(landAssetId))) :+ DeleteEntry(keyPresaleArtActivatedByAssetIdAndOwner(landAssetId, addr))) :+ DeleteEntry(keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId))) :+ DeleteEntry(keyLandArtStatusByTypeAssetIdAndOwner(ARTPRESALE, landAssetId, addr))) :+ DeleteEntry(keyLandNumToOwner(landNum))) :+ Burn(fromBase58String(landAssetId), 1)), props) | |
629 | 643 | } | |
630 | 644 | } | |
652 | 666 | let continent = r._3 | |
653 | 667 | let continentIdx = valueOrErrorMessage(indexOf(continents, continent), ("Unknown continent: " + continent)) | |
654 | 668 | let terrains = genTerrains(abs(toBigInt(txId)), continentIdx) | |
655 | - | let freeNum = valueOrElse(getInteger(keyNextFreeLandNum()), | |
669 | + | let freeNum = valueOrElse(getInteger(keyNextFreeLandNum()), (PRESALENUMLANDS + 1)) | |
656 | 670 | let newLandNum = toString(freeNum) | |
657 | 671 | let issue = Issue(keyNftName(newLandNum, newLandSize), makeString([newLandNum, newLandSize, terrains, continent], "_"), 1, 0, false) | |
658 | 672 | let assetId = calculateAssetId(issue) | |
713 | 727 | ||
714 | 728 | ||
715 | 729 | @Callable(i) | |
716 | - | func stakeLand () = { | |
717 | - | let pmt = value(i.payments[0]) | |
718 | - | let assetId = value(pmt.assetId) | |
719 | - | let address = toString(i.caller) | |
720 | - | if ((pmt.amount != 1)) | |
721 | - | then throw((("NFT " + LANDPREFIX) + " token should be attached as payment")) | |
722 | - | else { | |
723 | - | let asset = value(assetInfo(assetId)) | |
724 | - | if ((asset.issuer != this)) | |
725 | - | then throw("Unknown issuer of token") | |
726 | - | else if (!(contains(asset.name, LANDPREFIX))) | |
727 | - | then throw((("Only NFT " + LANDPREFIX) + " tokens are accepted")) | |
728 | - | else { | |
729 | - | let landNumSize = drop(asset.name, 4) | |
730 | - | let landNum = if (contains(landNumSize, "XXL")) | |
731 | - | then dropRight(landNumSize, 3) | |
732 | - | else if (contains(landNumSize, "XL")) | |
733 | - | then dropRight(landNumSize, 2) | |
734 | - | else dropRight(landNumSize, 1) | |
735 | - | let landNumInt = valueOrErrorMessage(parseInt(landNum), ("Cannot parse land number from " + asset.name)) | |
736 | - | let landAssetId = toBase58String(assetId) | |
737 | - | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
738 | - | if (isDefined(getInteger(timeKey))) | |
739 | - | then throw((("NFT " + asset.name) + " is already staked")) | |
740 | - | else { | |
741 | - | let d = split(asset.description, "_") | |
742 | - | let terrainCounts = countTerrains(d[recTerrains]) | |
743 | - | let props = updateProportions(terrainCounts, (numPiecesBySize(d[recLandSize]) / 25), 1) | |
730 | + | func stakeLand () = if ((size(i.payments) != 1)) | |
731 | + | then throw("Exactly one payment required") | |
732 | + | else { | |
733 | + | let pmt = value(i.payments[0]) | |
734 | + | let assetId = value(pmt.assetId) | |
735 | + | let address = toString(i.caller) | |
736 | + | if ((pmt.amount != 1)) | |
737 | + | then throw((("NFT " + LANDPREFIX) + " token should be attached as payment")) | |
738 | + | else { | |
739 | + | let asset = value(assetInfo(assetId)) | |
740 | + | if ((asset.issuer != this)) | |
741 | + | then throw("Unknown issuer of token") | |
742 | + | else if (!(contains(asset.name, LANDPREFIX))) | |
743 | + | then throw((("Only NFT " + LANDPREFIX) + " tokens are accepted")) | |
744 | + | else { | |
745 | + | let landNumSize = drop(asset.name, 4) | |
746 | + | let landNum = if (contains(landNumSize, "XXL")) | |
747 | + | then dropRight(landNumSize, 3) | |
748 | + | else if (contains(landNumSize, "XL")) | |
749 | + | then dropRight(landNumSize, 2) | |
750 | + | else dropRight(landNumSize, 1) | |
751 | + | if (!(isDefined(parseInt(landNum)))) | |
752 | + | then throw(("Cannot parse land number from " + asset.name)) | |
753 | + | else { | |
754 | + | let landAssetId = toBase58String(assetId) | |
755 | + | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
756 | + | if (isDefined(getInteger(timeKey))) | |
757 | + | then throw((("NFT " + asset.name) + " is already staked")) | |
758 | + | else { | |
759 | + | let d = split(asset.description, "_") | |
760 | + | let terrainCounts = countTerrains(d[recTerrains]) | |
761 | + | let props = updateProportions(terrainCounts, (numPiecesBySize(d[recLandSize]) / SSIZE), 1) | |
744 | 762 | [IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, address), lastBlock.timestamp), StringEntry(keyLandAssetIdToOwner(landAssetId), address), StringEntry(keyLandNumToOwner(landNum), address), StringEntry(keyResProportions(), props)] | |
745 | - | } | |
746 | - | } | |
747 | - | } | |
748 | - | } | |
763 | + | } | |
764 | + | } | |
765 | + | } | |
766 | + | } | |
767 | + | } | |
749 | 768 | ||
750 | 769 | ||
751 | 770 | ||
757 | 776 | let c = checkClaimConditions(addr) | |
758 | 777 | let terrainCounts = countTerrains(c._3[recTerrains]) | |
759 | 778 | let pieces = numPiecesBySize(c._3[recLandSize]) | |
760 | - | let props = updateProportions(terrainCounts, (pieces / | |
779 | + | let props = updateProportions(terrainCounts, (pieces / SSIZE), -1) | |
761 | 780 | let claimResult = claimAll(addr, c._2, pieces) | |
762 | 781 | [ScriptTransfer(i.caller, 1, fromBase58String(c._2)), DeleteEntry(keyStakedTimeByAssetId(c._2)), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, c._2, addr)), StringEntry(keyResProportions(), props), StringEntry(claimResult._2, makeString(claimResult._3, ":"))] | |
763 | 782 | } | |
765 | 784 | ||
766 | 785 | ||
767 | 786 | @Callable(i) | |
768 | - | func stakeDuck () = { | |
769 | - | let pmt = value(i.payments[0]) | |
770 | - | let assetId = value(pmt.assetId) | |
771 | - | let address = toString(i.caller) | |
772 | - | if ((pmt.amount != 1)) | |
773 | - | then throw((("NFT " + DUCKPREFIX) + " token should be attached as payment")) | |
774 | - | else { | |
775 | - | let asset = value(assetInfo(assetId)) | |
776 | - | if (if ((asset.issuer != incubatorAddr)) | |
777 | - | then (asset.issuer != breederAddr) | |
778 | - | else false) | |
779 | - | then throw((("Unknown issuer of " + DUCKPREFIX) + " token")) | |
780 | - | else if (!(contains(asset.name, DUCKPREFIX))) | |
781 | - | then throw((("Only NFT " + DUCKPREFIX) + " tokens are accepted")) | |
782 | - | else { | |
783 | - | let assetIdStr = toBase58String(assetId) | |
784 | - | let timeKey = keyStakedTimeByAssetId(assetIdStr) | |
785 | - | if (isDefined(getInteger(timeKey))) | |
786 | - | then throw((("NFT " + asset.name) + " is already staked")) | |
787 | - | else if (isDefined(getString(keyStakedDuckByOwner(address)))) | |
788 | - | then throw(("You already staked one duck: " + asset.name)) | |
789 | - | else { | |
790 | - | let locKey = keyDuckLocation(assetIdStr) | |
791 | - | let location = getString(locKey) | |
792 | - | let keyHealth = keyDuckHealth(assetIdStr) | |
793 | - | let health = getInteger(keyHealth) | |
794 | - | let bpKey = keyBackpackByDuck(assetIdStr) | |
795 | - | let backpack = getString(bpKey) | |
796 | - | ([IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry(keyDuckIdToOwner(assetIdStr), address), StringEntry(keyStakedDuckByOwner(address), assetIdStr)] ++ (if (isDefined(location)) | |
797 | - | then nil | |
798 | - | else ([StringEntry(locKey, DEFAULTLOCATION)] ++ (if (isDefined(health)) | |
787 | + | func stakeDuck () = if ((size(i.payments) != 1)) | |
788 | + | then throw("Exactly one payment required") | |
789 | + | else { | |
790 | + | let pmt = value(i.payments[0]) | |
791 | + | let assetId = value(pmt.assetId) | |
792 | + | let address = toString(i.caller) | |
793 | + | if ((pmt.amount != 1)) | |
794 | + | then throw((("NFT " + DUCKPREFIX) + " token should be attached as payment")) | |
795 | + | else { | |
796 | + | let asset = value(assetInfo(assetId)) | |
797 | + | if (if ((asset.issuer != incubatorAddr)) | |
798 | + | then (asset.issuer != breederAddr) | |
799 | + | else false) | |
800 | + | then throw((("Unknown issuer of " + DUCKPREFIX) + " token")) | |
801 | + | else if (!(contains(asset.name, DUCKPREFIX))) | |
802 | + | then throw((("Only NFT " + DUCKPREFIX) + " tokens are accepted")) | |
803 | + | else { | |
804 | + | let assetIdStr = toBase58String(assetId) | |
805 | + | let timeKey = keyStakedTimeByAssetId(assetIdStr) | |
806 | + | if (isDefined(getInteger(timeKey))) | |
807 | + | then throw((("NFT " + asset.name) + " is already staked")) | |
808 | + | else if (isDefined(getString(keyStakedDuckByOwner(address)))) | |
809 | + | then throw(("You already staked one duck: " + asset.name)) | |
810 | + | else { | |
811 | + | let locKey = keyDuckLocation(assetIdStr) | |
812 | + | let location = getString(locKey) | |
813 | + | let bpKey = keyBackpackByDuck(assetIdStr) | |
814 | + | let backpack = getString(bpKey) | |
815 | + | ([IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry(keyDuckIdToOwner(assetIdStr), address), StringEntry(keyStakedDuckByOwner(address), assetIdStr)] ++ (if (isDefined(location)) | |
799 | 816 | then nil | |
800 | - | else ([ | |
817 | + | else ([StringEntry(locKey, DEFAULTLOCATION)] ++ (if (isDefined(backpack)) | |
801 | 818 | then nil | |
802 | - | else [StringEntry(bpKey, "0:0_0_0_0_0_0:0_0_0_0_0_0:")])))))) | |
803 | - | } | |
804 | - | } | |
805 | - | } | |
806 | - | } | |
819 | + | else ([StringEntry(bpKey, "0:0_0_0_0_0_0:0_0_0_0_0_0:")] :+ IntegerEntry(keyDuckHealth(assetIdStr), 100)))))) | |
820 | + | } | |
821 | + | } | |
822 | + | } | |
823 | + | } | |
807 | 824 | ||
808 | 825 | ||
809 | 826 | ||
814 | 831 | let assetId = fromBase58String(assetIdStr) | |
815 | 832 | let address = toString(i.caller) | |
816 | 833 | let asset = value(assetInfo(assetId)) | |
817 | - | if (if ((asset.issuer != incubatorAddr)) | |
818 | - | then (asset.issuer != breederAddr) | |
819 | - | else false) | |
820 | - | then throw((("Unknown issuer of " + DUCKPREFIX) + " token")) | |
821 | - | else if (!(contains(asset.name, DUCKPREFIX))) | |
822 | - | then throw((("Only NFT " + DUCKPREFIX) + " tokens can be unstaked")) | |
834 | + | let timeKey = keyStakedTimeByAssetId(toBase58String(assetId)) | |
835 | + | if (!(isDefined(timeKey))) | |
836 | + | then throw((("NFT " + asset.name) + " is not staked")) | |
837 | + | else if (!(isDefined(keyStakedDuckByOwner(address)))) | |
838 | + | then throw((("The duck " + asset.name) + " is not staked")) | |
823 | 839 | else { | |
824 | - | let timeKey = keyStakedTimeByAssetId(toBase58String(assetId)) | |
825 | - | if (!(isDefined(timeKey))) | |
826 | - | then throw((("NFT " + asset.name) + " is not staked")) | |
827 | - | else if (!(isDefined(keyStakedDuckByOwner(address)))) | |
828 | - | then throw((("The duck " + asset.name) + " is not staked")) | |
829 | - | else { | |
830 | - | let owner = valueOrErrorMessage(getString(keyDuckIdToOwner(toBase58String(assetId))), (("NFT " + asset.name) + " is orphaned")) | |
831 | - | if ((owner != address)) | |
832 | - | then throw("Staked NFT is not yours") | |
833 | - | else [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(timeKey), DeleteEntry(keyDuckLocation(assetIdStr)), DeleteEntry(keyDuckIdToOwner(assetIdStr)), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, assetIdStr, address)), DeleteEntry(keyStakedDuckByOwner(address))] | |
834 | - | } | |
840 | + | let owner = valueOrErrorMessage(getString(keyDuckIdToOwner(toBase58String(assetId))), (("NFT " + asset.name) + " is orphaned")) | |
841 | + | if ((owner != address)) | |
842 | + | then throw("Staked NFT is not yours") | |
843 | + | else { | |
844 | + | let keyHealth = keyDuckHealth(assetIdStr) | |
845 | + | let health = getInteger(keyHealth) | |
846 | + | if ((health != 100)) | |
847 | + | then throw("Please heal your duck before unstaking") | |
848 | + | else [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(timeKey), DeleteEntry(keyHealth), DeleteEntry(keyDuckLocation(assetIdStr)), DeleteEntry(keyDuckIdToOwner(assetIdStr)), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, assetIdStr, address)), DeleteEntry(keyStakedDuckByOwner(address))] | |
849 | + | } | |
835 | 850 | } | |
836 | 851 | } | |
837 | 852 | ||
945 | 960 | then throw(("Payment attached should be " + toString(EXPUSDN))) | |
946 | 961 | else { | |
947 | 962 | let result = expeditionCommon(false, i.caller, i.transactionId, message, sig) | |
948 | - | $Tuple2((result._1 :+ ScriptTransfer(economyAddr, pmt.amount, usdnAssetId)), result._2) | |
963 | + | if ((result._2 == "")) | |
964 | + | then result | |
965 | + | else $Tuple2((result._1 :+ ScriptTransfer(economyAddr, pmt.amount, usdnAssetId)), result._2) | |
949 | 966 | } | |
950 | 967 | } | |
951 | 968 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let chain = toUtf8String(take(drop(this.bytes, 1), 1)) | |
5 | 5 | ||
6 | 6 | let usdnAssetId = match chain { | |
7 | 7 | case _ => | |
8 | 8 | if (("W" == $match0)) | |
9 | 9 | then base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
10 | 10 | else if (("T" == $match0)) | |
11 | 11 | then base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ' | |
12 | 12 | else throw("Unknown chain") | |
13 | 13 | } | |
14 | 14 | ||
15 | 15 | let incubatorAddr = match chain { | |
16 | 16 | case _ => | |
17 | 17 | if (("W" == $match0)) | |
18 | 18 | then addressFromStringValue("3PEktVux2RhchSN63DsDo4b4mz4QqzKSeDv") | |
19 | 19 | else if (("T" == $match0)) | |
20 | 20 | then this | |
21 | 21 | else throw("Unknown chain") | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | let breederAddr = match chain { | |
25 | 25 | case _ => | |
26 | 26 | if (("W" == $match0)) | |
27 | 27 | then addressFromStringValue("3PDVuU45H7Eh5dmtNbnRNRStGwULA7NY6Hb") | |
28 | 28 | else if (("T" == $match0)) | |
29 | 29 | then this | |
30 | 30 | else throw("Unknown chain") | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | let economyAddr = match chain { | |
34 | 34 | case _ => | |
35 | 35 | if (("W" == $match0)) | |
36 | 36 | then addressFromStringValue("3P2sk1KncSxRaZs8b4CWGPw2jkvvav74u4D") | |
37 | 37 | else if (("T" == $match0)) | |
38 | 38 | then addressFromStringValue("3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep") | |
39 | 39 | else throw("Unknown chain") | |
40 | 40 | } | |
41 | 41 | ||
42 | 42 | let pub = base58'6LfPuKJjLgekmncBhMg2LZyMTNVzZBccXR28ySXm9uXD' | |
43 | 43 | ||
44 | 44 | let HEALCOST = 10000 | |
45 | 45 | ||
46 | 46 | let LANDPREFIX = "LAND" | |
47 | 47 | ||
48 | 48 | let DUCKPREFIX = "DUCK" | |
49 | 49 | ||
50 | 50 | let DEFAULTLOCATION = "Africa_F_Africa" | |
51 | 51 | ||
52 | 52 | let NUMRES = 6 | |
53 | + | ||
54 | + | let SSIZE = 25 | |
55 | + | ||
56 | + | let MSIZE = 100 | |
57 | + | ||
58 | + | let LSIZE = 225 | |
59 | + | ||
60 | + | let XLSIZE = 400 | |
61 | + | ||
62 | + | let XXLSIZE = 625 | |
53 | 63 | ||
54 | 64 | let DAILYRESBYPIECE = 3456000 | |
55 | 65 | ||
56 | 66 | let DAYMILLIS = 86400000 | |
57 | 67 | ||
58 | 68 | let FIVEMINUTESMILLIS = 300000 | |
59 | 69 | ||
60 | 70 | let RESOURCEPRICEMIN = 158549 | |
61 | 71 | ||
62 | 72 | let InfraUpgradeCostS = match chain { | |
63 | 73 | case _ => | |
64 | 74 | if (("W" == $match0)) | |
65 | 75 | then 6307198406 | |
66 | 76 | else if (("T" == $match0)) | |
67 | 77 | then 63071984 | |
68 | 78 | else throw("Unknown chain") | |
69 | 79 | } | |
70 | 80 | ||
71 | 81 | let InfraUpgradeCostSUsdn = match chain { | |
72 | 82 | case _ => | |
73 | 83 | if (("W" == $match0)) | |
74 | 84 | then 40000000 | |
75 | 85 | else if (("T" == $match0)) | |
76 | 86 | then 400000 | |
77 | 87 | else throw("Unknown chain") | |
78 | 88 | } | |
79 | 89 | ||
80 | 90 | let EXPMATERIALS = match chain { | |
81 | 91 | case _ => | |
82 | 92 | if (("W" == $match0)) | |
83 | 93 | then 157679960139 | |
84 | 94 | else if (("T" == $match0)) | |
85 | 95 | then 1576799601 | |
86 | 96 | else throw("Unknown chain") | |
87 | 97 | } | |
88 | 98 | ||
89 | 99 | let EXPUSDN = match chain { | |
90 | 100 | case _ => | |
91 | 101 | if (("W" == $match0)) | |
92 | 102 | then 1000000000 | |
93 | 103 | else if (("T" == $match0)) | |
94 | 104 | then 10000000 | |
95 | 105 | else throw("Unknown chain") | |
96 | 106 | } | |
97 | 107 | ||
98 | 108 | let MULT6 = 1000000 | |
99 | 109 | ||
100 | 110 | let FIVEX = toBigInt(5) | |
101 | 111 | ||
102 | 112 | let TWENTYX = toBigInt(20) | |
103 | 113 | ||
104 | 114 | let TWENTY2X = toBigInt((20 * 20)) | |
105 | 115 | ||
106 | 116 | let TWENTY3X = toBigInt(((20 * 20) * 20)) | |
107 | 117 | ||
108 | 118 | let TWENTY4X = toBigInt((((20 * 20) * 20) * 20)) | |
109 | 119 | ||
110 | 120 | let TWENTY5X = toBigInt(((((20 * 20) * 20) * 20) * 20)) | |
111 | 121 | ||
112 | 122 | let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
113 | 123 | ||
114 | 124 | let continents = ["Asia", "Europe", "Americas", "Oceania", "Africa"] | |
115 | 125 | ||
116 | 126 | let ARTPRESALE = "PRESALE" | |
127 | + | ||
128 | + | let PRESALENUMLANDS = 500 | |
117 | 129 | ||
118 | 130 | func keyNextFreeLandNum () = "nextLandNum" | |
119 | 131 | ||
120 | 132 | ||
121 | 133 | func keyLandToAssetId (landNum) = ("landToAsset_" + landNum) | |
122 | 134 | ||
123 | 135 | ||
124 | 136 | func keyNftName (landNum,landSize) = ((LANDPREFIX + landNum) + landSize) | |
125 | 137 | ||
126 | 138 | ||
127 | 139 | func keyLandAssetIdToOwner (assetId) = ("nftOwner_" + assetId) | |
128 | 140 | ||
129 | 141 | ||
130 | 142 | func keyDuckIdToOwner (assetId) = ("duckOwner_" + assetId) | |
131 | 143 | ||
132 | 144 | ||
133 | 145 | func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId) | |
134 | 146 | ||
135 | 147 | ||
136 | 148 | func keyInfraLevelByAssetId (assetId) = ("infraLevel_" + assetId) | |
137 | 149 | ||
138 | 150 | ||
139 | 151 | func keyInfraLevelByAssetIdAndOwner (assetId,ownerAddr) = ((("infraLevelByAssetIdAndOwner_" + assetId) + "_") + ownerAddr) | |
140 | 152 | ||
141 | 153 | ||
142 | 154 | func keyPresaleArtActivatedByAssetId (assetId) = ("presaleArtActivated_" + assetId) | |
143 | 155 | ||
144 | 156 | ||
145 | 157 | func keyPresaleArtActivatedByAssetIdAndOwner (assetId,ownerAddr) = ((("presaleArtActivatedByAssetIdAndOwner_" + assetId) + "_") + ownerAddr) | |
146 | 158 | ||
147 | 159 | ||
148 | 160 | func keyLandArtStatusByTypeAndAssetId (type,assetId) = makeString(["landArtStatus", type, assetId], "_") | |
149 | 161 | ||
150 | 162 | ||
151 | 163 | func keyLandArtStatusByTypeAssetIdAndOwner (type,assetId,ownerAddr) = makeString(["landArtStatusByTypeAssetIdAndOwner", type, assetId, ownerAddr], "_") | |
152 | 164 | ||
153 | 165 | ||
154 | 166 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
155 | 167 | ||
156 | 168 | ||
157 | 169 | func keyStakedTimeByTypeAssetIdAndOwner (nftType,assetId,ownerAddr) = ((((("stakedTimeByTypeAssetIdAndOwner_" + nftType) + "_") + assetId) + "_") + ownerAddr) | |
158 | 170 | ||
159 | 171 | ||
160 | 172 | func keyLandNumToOwner (landNum) = ("landOwner_" + landNum) | |
161 | 173 | ||
162 | 174 | ||
163 | 175 | func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId) | |
164 | 176 | ||
165 | 177 | ||
166 | 178 | func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId) | |
167 | 179 | ||
168 | 180 | ||
169 | 181 | func keyDuckHealth (duckAssetId) = ("duckHealth_" + duckAssetId) | |
170 | 182 | ||
171 | 183 | ||
172 | 184 | func keyResProportions () = "resTypesProportions" | |
173 | 185 | ||
174 | 186 | ||
175 | 187 | let recLandNum = 0 | |
176 | 188 | ||
177 | 189 | let recLandSize = 1 | |
178 | 190 | ||
179 | 191 | let recTerrains = 2 | |
180 | 192 | ||
181 | 193 | let recContinent = 3 | |
182 | 194 | ||
183 | 195 | let locIdxContinent = 0 | |
184 | 196 | ||
185 | 197 | let locIdxType = 1 | |
186 | 198 | ||
187 | 199 | let locIdxId = 2 | |
188 | 200 | ||
189 | 201 | let bpIdxLevel = 0 | |
190 | 202 | ||
191 | 203 | let bpIdxRes = 1 | |
192 | 204 | ||
193 | 205 | let bpIdxMat = 2 | |
194 | 206 | ||
195 | 207 | let bpIdxProd = 3 | |
196 | 208 | ||
197 | 209 | func asString (v) = match v { | |
198 | 210 | case s: String => | |
199 | 211 | s | |
200 | 212 | case _ => | |
201 | 213 | throw("fail to cast into String") | |
202 | 214 | } | |
203 | 215 | ||
204 | 216 | ||
205 | 217 | func getNeededMaterials (total) = { | |
206 | 218 | let props = split(value(getString(keyResProportions())), "_") | |
207 | 219 | if ((size(props) != NUMRES)) | |
208 | 220 | then throw("Wrong proportions data") | |
209 | 221 | else { | |
210 | 222 | let r = [parseIntValue(props[0]), parseIntValue(props[1]), parseIntValue(props[2]), parseIntValue(props[3]), parseIntValue(props[4]), parseIntValue(props[5])] | |
211 | 223 | let sum = (((((r[0] + r[1]) + r[2]) + r[3]) + r[4]) + r[5]) | |
212 | 224 | if ((0 >= sum)) | |
213 | 225 | then throw("No lands staked") | |
214 | 226 | else { | |
215 | 227 | let norm6 = fraction(total, MULT6, sum) | |
216 | 228 | func normalizer (acc,elem) = (acc :+ fraction(elem, norm6, MULT6)) | |
217 | 229 | ||
218 | 230 | let $l = r | |
219 | 231 | let $s = size($l) | |
220 | 232 | let $acc0 = nil | |
221 | 233 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
222 | 234 | then $a | |
223 | 235 | else normalizer($a, $l[$i]) | |
224 | 236 | ||
225 | 237 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
226 | 238 | then $a | |
227 | 239 | else throw("List size exceeds 6") | |
228 | 240 | ||
229 | 241 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
230 | 242 | } | |
231 | 243 | } | |
232 | 244 | } | |
233 | 245 | ||
234 | 246 | ||
235 | 247 | func subtractMaterials (shouldUseMat,has,totalNeed) = { | |
236 | 248 | let need = getNeededMaterials(totalNeed) | |
237 | 249 | func subtractor (acc,idx) = { | |
238 | 250 | let result = (parseIntValue(has[idx]) - need[idx]) | |
239 | 251 | if ((0 > result)) | |
240 | 252 | then throw(((((("Not enough material idx=" + toString(idx)) + ", you have ") + has[idx]) + ", but need ") + toString(need[idx]))) | |
241 | 253 | else (acc :+ toString(result)) | |
242 | 254 | } | |
243 | 255 | ||
244 | 256 | if (shouldUseMat) | |
245 | 257 | then { | |
246 | 258 | let $l = [0, 1, 2, 3, 4, 5] | |
247 | 259 | let $s = size($l) | |
248 | 260 | let $acc0 = nil | |
249 | 261 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
250 | 262 | then $a | |
251 | 263 | else subtractor($a, $l[$i]) | |
252 | 264 | ||
253 | 265 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
254 | 266 | then $a | |
255 | 267 | else throw("List size exceeds 6") | |
256 | 268 | ||
257 | 269 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
258 | 270 | } | |
259 | 271 | else has | |
260 | 272 | } | |
261 | 273 | ||
262 | 274 | ||
263 | 275 | func updateProportionsInternal (propList,terrainCounts,landSizeIndex,sign) = if ((size(propList) != NUMRES)) | |
264 | 276 | then throw("Wrong proportions data") | |
265 | 277 | else { | |
266 | 278 | func updater (acc,i) = { | |
267 | 279 | let result = (parseIntValue(propList[i]) + ((sign * terrainCounts[i]) * landSizeIndex)) | |
268 | 280 | if ((0 > result)) | |
269 | 281 | then throw(((((((("Panic! Pieces of type=" + toString(i)) + ", sign=") + toString(sign)) + ", terrainCounts[i]=") + toString(terrainCounts[i])) + ", landSizeIndex=") + toString(landSizeIndex))) | |
270 | 282 | else (acc :+ toString(result)) | |
271 | 283 | } | |
272 | 284 | ||
273 | 285 | let r = { | |
274 | 286 | let $l = [0, 1, 2, 3, 4, 5] | |
275 | 287 | let $s = size($l) | |
276 | 288 | let $acc0 = nil | |
277 | 289 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
278 | 290 | then $a | |
279 | 291 | else updater($a, $l[$i]) | |
280 | 292 | ||
281 | 293 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
282 | 294 | then $a | |
283 | 295 | else throw("List size exceeds 6") | |
284 | 296 | ||
285 | 297 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
286 | 298 | } | |
287 | 299 | makeString(r, "_") | |
288 | 300 | } | |
289 | 301 | ||
290 | 302 | ||
291 | 303 | func updateProportions (terrainCounts,landSizeIndex,sign) = { | |
292 | 304 | let propList = split(valueOrElse(getString(keyResProportions()), "0_0_0_0_0_0"), "_") | |
293 | 305 | updateProportionsInternal(propList, terrainCounts, landSizeIndex, sign) | |
294 | 306 | } | |
295 | 307 | ||
296 | 308 | ||
297 | 309 | func countTerrains (terrains) = [(size(split(terrains, "A")) - 1), (size(split(terrains, "B")) - 1), (size(split(terrains, "C")) - 1), (size(split(terrains, "D")) - 1), (size(split(terrains, "E")) - 1), (size(split(terrains, "F")) - 1)] | |
298 | 310 | ||
299 | 311 | ||
300 | 312 | func numPiecesBySize (landSize) = match landSize { | |
301 | 313 | case _ => | |
302 | 314 | if (("S" == $match0)) | |
303 | - | then | |
315 | + | then SSIZE | |
304 | 316 | else if (("M" == $match0)) | |
305 | - | then | |
317 | + | then MSIZE | |
306 | 318 | else if (("L" == $match0)) | |
307 | - | then | |
319 | + | then LSIZE | |
308 | 320 | else if (("XL" == $match0)) | |
309 | - | then | |
321 | + | then XLSIZE | |
310 | 322 | else if (("XXL" == $match0)) | |
311 | - | then | |
323 | + | then XXLSIZE | |
312 | 324 | else throw("Unknown land size") | |
313 | 325 | } | |
314 | 326 | ||
315 | 327 | ||
316 | 328 | func subOneInList (aList,idx,amount) = { | |
317 | 329 | func subber (acc,i) = (acc :+ (if ((i == idx)) | |
318 | 330 | then toString((parseIntValue(aList[i]) - amount)) | |
319 | 331 | else aList[i])) | |
320 | 332 | ||
321 | 333 | let r = { | |
322 | 334 | let $l = [0, 1, 2, 3, 4, 5] | |
323 | 335 | let $s = size($l) | |
324 | 336 | let $acc0 = nil | |
325 | 337 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
326 | 338 | then $a | |
327 | 339 | else subber($a, $l[$i]) | |
328 | 340 | ||
329 | 341 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
330 | 342 | then $a | |
331 | 343 | else throw("List size exceeds 6") | |
332 | 344 | ||
333 | 345 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
334 | 346 | } | |
335 | 347 | makeString(r, "_") | |
336 | 348 | } | |
337 | 349 | ||
338 | 350 | ||
339 | 351 | func addRes (currentRes,terrainCounts,deltaTime,landSizeIndex,dailyByPieceWithBonuses) = { | |
340 | 352 | func adder (acc,i) = { | |
341 | 353 | let resOfType = ((fraction(deltaTime, dailyByPieceWithBonuses, DAYMILLIS) * terrainCounts[i]) * landSizeIndex) | |
342 | 354 | (acc :+ toString((parseIntValue(currentRes[i]) + resOfType))) | |
343 | 355 | } | |
344 | 356 | ||
345 | 357 | let r = { | |
346 | 358 | let $l = [0, 1, 2, 3, 4, 5] | |
347 | 359 | let $s = size($l) | |
348 | 360 | let $acc0 = nil | |
349 | 361 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
350 | 362 | then $a | |
351 | 363 | else adder($a, $l[$i]) | |
352 | 364 | ||
353 | 365 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
354 | 366 | then $a | |
355 | 367 | else throw("List size exceeds 6") | |
356 | 368 | ||
357 | 369 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
358 | 370 | } | |
359 | 371 | makeString(r, "_") | |
360 | 372 | } | |
361 | 373 | ||
362 | 374 | ||
363 | 375 | func abs (x) = if ((x >= toBigInt(0))) | |
364 | 376 | then x | |
365 | 377 | else -(x) | |
366 | 378 | ||
367 | 379 | ||
368 | 380 | let freq = [[1, 4, 9, 10, 15], [5, 8, 13, 14, 15], [6, 9, 14, 15, 16], [4, 7, 8, 13, 18], [1, 6, 7, 15, 19]] | |
369 | 381 | ||
370 | 382 | func genChar (n,freqs) = { | |
371 | 383 | let rem = toInt((n % TWENTYX)) | |
372 | 384 | let letter = if ((freqs[0] > rem)) | |
373 | 385 | then "A" | |
374 | 386 | else if ((freqs[1] > rem)) | |
375 | 387 | then "B" | |
376 | 388 | else if ((freqs[2] > rem)) | |
377 | 389 | then "C" | |
378 | 390 | else if ((freqs[3] > rem)) | |
379 | 391 | then "D" | |
380 | 392 | else if ((freqs[4] > rem)) | |
381 | 393 | then "E" | |
382 | 394 | else "F" | |
383 | 395 | letter | |
384 | 396 | } | |
385 | 397 | ||
386 | 398 | ||
387 | 399 | func genTerrains (seed,continentIdx) = { | |
388 | 400 | let f = freq[continentIdx] | |
389 | 401 | func terrainGenerator (acc,elem) = $Tuple2((((((acc._1 + genChar(acc._2, f)) + genChar((acc._2 / TWENTYX), f)) + genChar((acc._2 / TWENTY2X), f)) + genChar((acc._2 / TWENTY3X), f)) + genChar((acc._2 / TWENTY4X), f)), (acc._2 / TWENTY5X)) | |
390 | 402 | ||
391 | 403 | let t = { | |
392 | 404 | let $l = [1, 2, 3, 4, 5] | |
393 | 405 | let $s = size($l) | |
394 | 406 | let $acc0 = $Tuple2("", (seed / FIVEX)) | |
395 | 407 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
396 | 408 | then $a | |
397 | 409 | else terrainGenerator($a, $l[$i]) | |
398 | 410 | ||
399 | 411 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
400 | 412 | then $a | |
401 | 413 | else throw("List size exceeds 5") | |
402 | 414 | ||
403 | 415 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
404 | 416 | } | |
405 | 417 | t._1 | |
406 | 418 | } | |
407 | 419 | ||
408 | 420 | ||
409 | 421 | func getBackpack (bpKey) = { | |
410 | 422 | let p = split(valueOrElse(getString(bpKey), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":") | |
411 | 423 | [toString(valueOrElse(parseInt(p[bpIdxLevel]), 0)), if ((size(split(p[bpIdxRes], "_")) == NUMRES)) | |
412 | 424 | then p[bpIdxRes] | |
413 | 425 | else "0_0_0_0_0_0", if ((size(split(p[bpIdxMat], "_")) == NUMRES)) | |
414 | 426 | then p[bpIdxMat] | |
415 | 427 | else "0_0_0_0_0_0", p[bpIdxProd]] | |
416 | 428 | } | |
417 | 429 | ||
418 | 430 | ||
419 | 431 | func expeditionCommon (shouldUseMat,caller,txId,message,sig) = if (!(sigVerify_8Kb(message, sig, pub))) | |
420 | 432 | then throw("signature does not match") | |
421 | 433 | else { | |
422 | 434 | let parts = split(toUtf8String(message), ";") | |
423 | 435 | let hp = split(split(parts[0], "|")[0], "_") | |
424 | 436 | let curHP = parseIntValue(hp[0]) | |
425 | 437 | let newHP = parseIntValue(hp[1]) | |
426 | 438 | let locAndTime = split(parts[1], ":") | |
427 | 439 | let targetLocation = split(locAndTime[0], "_") | |
428 | 440 | if ((targetLocation[1] != "E")) | |
429 | 441 | then throw("expedition target location type should be E") | |
430 | 442 | else { | |
431 | 443 | let time = parseIntValue(locAndTime[1]) | |
432 | 444 | if (if ((time > (lastBlock.timestamp + FIVEMINUTESMILLIS))) | |
433 | 445 | then true | |
434 | 446 | else ((lastBlock.timestamp - FIVEMINUTESMILLIS) > time)) | |
435 | 447 | then throw("signature outdated") | |
436 | 448 | else { | |
437 | 449 | let userAddr = toString(caller) | |
438 | 450 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(userAddr)), "You don't have a duck staked") | |
439 | 451 | let keyHealth = keyDuckHealth(duckAssetId) | |
440 | 452 | let oldFromState = valueOrElse(getInteger(keyHealth), 100) | |
441 | 453 | if ((oldFromState != curHP)) | |
442 | 454 | then throw(((("oldHealth=" + toString(valueOrElse(getInteger(keyHealth), 100))) + " from state does not match one from flight log=") + toString(curHP))) | |
443 | 455 | else if ((0 >= curHP)) | |
444 | 456 | then throw("You can't fly with zero health") | |
445 | 457 | else if ((0 >= newHP)) | |
446 | 458 | then $Tuple2(((if (!(shouldUseMat)) | |
447 | 459 | then [ScriptTransfer(caller, EXPUSDN, usdnAssetId)] | |
448 | 460 | else nil) :+ IntegerEntry(keyHealth, 0)), "") | |
449 | 461 | else { | |
450 | 462 | let bpKey = keyBackpackByDuck(duckAssetId) | |
451 | 463 | let currentPack = getBackpack(bpKey) | |
452 | 464 | let mList = split(currentPack[bpIdxMat], "_") | |
453 | 465 | let newMat = makeString(subtractMaterials(shouldUseMat, mList, EXPMATERIALS), "_") | |
454 | 466 | let bigNum = abs(toBigInt(txId)) | |
455 | - | let freeNum = valueOrElse(getInteger(keyNextFreeLandNum()), | |
467 | + | let freeNum = valueOrElse(getInteger(keyNextFreeLandNum()), (PRESALENUMLANDS + 1)) | |
456 | 468 | let landNum = toString(freeNum) | |
457 | 469 | let continentIdx = toInt((bigNum % FIVEX)) | |
458 | 470 | let terrains = genTerrains(bigNum, continentIdx) | |
459 | 471 | let continent = continents[continentIdx] | |
460 | 472 | let issue = Issue(keyNftName(landNum, "S"), makeString([landNum, "S", terrains, continent], "_"), 1, 0, false) | |
461 | 473 | let assetId = calculateAssetId(issue) | |
462 | 474 | let id = toBase58String(assetId) | |
463 | 475 | $Tuple2([IntegerEntry(keyNextFreeLandNum(), (freeNum + 1)), issue, StringEntry(keyLandToAssetId(landNum), id), StringEntry(keyLandAssetIdToOwner(id), userAddr), StringEntry(keyLandNumToOwner(landNum), userAddr), IntegerEntry(keyInfraLevelByAssetId(id), 0), IntegerEntry(keyInfraLevelByAssetIdAndOwner(id, userAddr), 0), ScriptTransfer(caller, 1, assetId), StringEntry(keyDuckLocation(duckAssetId), makeString([continent, "L", id], "_")), IntegerEntry(keyHealth, newHP), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], newMat, currentPack[bpIdxProd]], ":"))], id) | |
464 | 476 | } | |
465 | 477 | } | |
466 | 478 | } | |
467 | 479 | } | |
468 | 480 | ||
469 | 481 | ||
470 | 482 | func applyBonuses (landAssetId,pieces) = { | |
471 | 483 | let infraLevel = valueOrElse(getInteger(keyInfraLevelByAssetId(landAssetId)), 0) | |
472 | 484 | let artPieces = valueOrElse(getInteger(keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId)), if (valueOrElse(getBoolean(keyPresaleArtActivatedByAssetId(landAssetId)), false)) | |
473 | 485 | then pieces | |
474 | 486 | else 0) | |
475 | 487 | ((DAILYRESBYPIECE + fraction(DAILYRESBYPIECE, infraLevel, 4)) + fraction(DAILYRESBYPIECE, (artPieces * 3), (pieces * 20))) | |
476 | 488 | } | |
477 | 489 | ||
478 | 490 | ||
479 | 491 | func checkClaimConditions (addr) = { | |
480 | 492 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(addr)), "You don't have a duck staked") | |
481 | 493 | let curLocation = valueOrElse(getString(keyDuckLocation(duckAssetId)), DEFAULTLOCATION) | |
482 | 494 | let loc = split(value(curLocation), "_") | |
483 | 495 | if ((loc[locIdxType] != "L")) | |
484 | 496 | then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L")) | |
485 | 497 | else { | |
486 | 498 | let landAssetId = loc[locIdxId] | |
487 | 499 | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
488 | 500 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
489 | - | let savedTime = valueOrErrorMessage(getInteger(timeKey), ((" | |
501 | + | let savedTime = valueOrErrorMessage(getInteger(timeKey), (("Your duck is on " + asset.name) + ", which is not staked")) | |
490 | 502 | let owner = valueOrErrorMessage(getString(keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned")) | |
491 | 503 | if ((owner != addr)) | |
492 | 504 | then throw((LANDPREFIX + " is not yours")) | |
493 | 505 | else { | |
494 | 506 | let d = split(asset.description, "_") | |
495 | 507 | $Tuple4(duckAssetId, landAssetId, d, savedTime) | |
496 | 508 | } | |
497 | 509 | } | |
498 | 510 | } | |
499 | 511 | ||
500 | 512 | ||
501 | - | func claimResInternal (addr,amount) = { | |
502 | - | let c = checkClaimConditions(addr) | |
503 | - | let landSize = c._3[recLandSize] | |
504 | - | let terrainCounts = countTerrains(c._3[recTerrains]) | |
505 | - | let deltaTime = (lastBlock.timestamp - c._4) | |
506 | - | if ((0 > deltaTime)) | |
507 | - | then throw(((("Saved timestamp is in future, saved = " + toString(c._4)) + ", current = ") + toString(lastBlock.timestamp))) | |
508 | - | else { | |
509 | - | let pieces = numPiecesBySize(landSize) | |
510 | - | let dailyProductionByPiece = applyBonuses(c._2, pieces) | |
511 | - | let availRes = fraction(deltaTime, (dailyProductionByPiece * pieces), DAYMILLIS) | |
512 | - | if ((amount > availRes)) | |
513 | - | then throw(((("Not enough resources, available = " + toString(availRes)) + ", requested = ") + toString(amount))) | |
514 | - | else { | |
515 | - | let newDeltaTime = fraction((availRes - amount), DAYMILLIS, (dailyProductionByPiece * pieces)) | |
516 | - | let newTimestamp = (lastBlock.timestamp - newDeltaTime) | |
517 | - | let bpKey = keyBackpackByDuck(c._1) | |
518 | - | let currentPack = getBackpack(bpKey) | |
519 | - | let currentRes = split(currentPack[bpIdxRes], "_") | |
520 | - | let bpRes = addRes(currentRes, terrainCounts, (deltaTime - newDeltaTime), (pieces / 25), dailyProductionByPiece) | |
521 | - | $Tuple3([IntegerEntry(keyStakedTimeByAssetId(c._2), newTimestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, c._2, addr), newTimestamp)], bpKey, [currentPack[bpIdxLevel], bpRes, currentPack[bpIdxMat], currentPack[bpIdxProd]]) | |
522 | - | } | |
523 | - | } | |
524 | - | } | |
513 | + | func claimResInternal (addr,amount) = if ((0 > amount)) | |
514 | + | then throw("Negative amount") | |
515 | + | else { | |
516 | + | let c = checkClaimConditions(addr) | |
517 | + | let landSize = c._3[recLandSize] | |
518 | + | let terrainCounts = countTerrains(c._3[recTerrains]) | |
519 | + | let deltaTime = (lastBlock.timestamp - c._4) | |
520 | + | if ((0 > deltaTime)) | |
521 | + | then throw(((("Saved timestamp is in future, saved = " + toString(c._4)) + ", current = ") + toString(lastBlock.timestamp))) | |
522 | + | else { | |
523 | + | let pieces = numPiecesBySize(landSize) | |
524 | + | let dailyProductionByPiece = applyBonuses(c._2, pieces) | |
525 | + | let availRes = fraction(deltaTime, (dailyProductionByPiece * pieces), DAYMILLIS) | |
526 | + | if ((amount > availRes)) | |
527 | + | then throw(((("Not enough resources, available = " + toString(availRes)) + ", requested = ") + toString(amount))) | |
528 | + | else { | |
529 | + | let newDeltaTime = fraction((availRes - amount), DAYMILLIS, (dailyProductionByPiece * pieces)) | |
530 | + | let newTimestamp = (lastBlock.timestamp - newDeltaTime) | |
531 | + | let bpKey = keyBackpackByDuck(c._1) | |
532 | + | let currentPack = getBackpack(bpKey) | |
533 | + | let currentRes = split(currentPack[bpIdxRes], "_") | |
534 | + | let bpRes = addRes(currentRes, terrainCounts, (deltaTime - newDeltaTime), (pieces / SSIZE), dailyProductionByPiece) | |
535 | + | $Tuple3([IntegerEntry(keyStakedTimeByAssetId(c._2), newTimestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, c._2, addr), newTimestamp)], bpKey, [currentPack[bpIdxLevel], bpRes, currentPack[bpIdxMat], currentPack[bpIdxProd]]) | |
536 | + | } | |
537 | + | } | |
538 | + | } | |
525 | 539 | ||
526 | 540 | ||
527 | 541 | func claimAll (addr,landAssetId,pieces) = { | |
528 | 542 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
529 | 543 | let savedTime = value(getInteger(timeKey)) | |
530 | 544 | let availRes = (fraction((lastBlock.timestamp - savedTime), applyBonuses(landAssetId, pieces), DAYMILLIS) * pieces) | |
531 | 545 | claimResInternal(addr, availRes) | |
532 | 546 | } | |
533 | 547 | ||
534 | 548 | ||
535 | 549 | func upInfraCommon (shouldUseMat,caller,paymentAmount) = { | |
536 | 550 | let addr = toString(caller) | |
537 | 551 | let c = checkClaimConditions(addr) | |
538 | 552 | let pieces = numPiecesBySize(c._3[recLandSize]) | |
539 | 553 | let infraKey = keyInfraLevelByAssetId(c._2) | |
540 | 554 | let curLevel = valueOrElse(getInteger(infraKey), 0) | |
541 | 555 | if ((curLevel >= 3)) | |
542 | 556 | then throw("Currently max infrastructure level = 3") | |
543 | 557 | else { | |
544 | 558 | let newLevel = (curLevel + 1) | |
545 | - | let cost = fraction(InfraUpgradeCostSUsdn, (pieces * newLevel), | |
559 | + | let cost = fraction(InfraUpgradeCostSUsdn, (pieces * newLevel), SSIZE) | |
546 | 560 | if (if (!(shouldUseMat)) | |
547 | 561 | then (paymentAmount != cost) | |
548 | 562 | else false) | |
549 | 563 | then throw(("Payment attached should be " + toString(cost))) | |
550 | 564 | else { | |
551 | 565 | let bpKey = keyBackpackByDuck(c._1) | |
552 | 566 | let currentPack = getBackpack(bpKey) | |
553 | 567 | let mList = split(currentPack[bpIdxMat], "_") | |
554 | - | let newMat = makeString(subtractMaterials(shouldUseMat, mList, fraction(InfraUpgradeCostS, (pieces * newLevel), | |
568 | + | let newMat = makeString(subtractMaterials(shouldUseMat, mList, fraction(InfraUpgradeCostS, (pieces * newLevel), SSIZE)), "_") | |
555 | 569 | let claimResult = claimAll(addr, c._2, pieces) | |
556 | 570 | $Tuple2(([IntegerEntry(infraKey, newLevel), IntegerEntry(keyInfraLevelByAssetIdAndOwner(c._2, addr), newLevel), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], claimResult._3[bpIdxRes], newMat, currentPack[bpIdxProd]], ":"))] ++ claimResult._1), newLevel) | |
557 | 571 | } | |
558 | 572 | } | |
559 | 573 | } | |
560 | 574 | ||
561 | 575 | ||
562 | 576 | func activatePresaleArt (addr) = { | |
563 | 577 | let c = checkClaimConditions(addr) | |
564 | 578 | let landAssetId = c._2 | |
565 | 579 | let activationKey = keyPresaleArtActivatedByAssetId(landAssetId) | |
566 | 580 | if (valueOrElse(getBoolean(activationKey), false)) | |
567 | 581 | then throw("Presale artifact is already activated") | |
568 | - | else if ((parseIntValue(c._3[recLandNum]) > | |
582 | + | else if ((parseIntValue(c._3[recLandNum]) > PRESALENUMLANDS)) | |
569 | 583 | then throw((((LANDPREFIX + " ") + landAssetId) + " is not eligible for presale artifact")) | |
570 | 584 | else { | |
571 | 585 | let pieces = numPiecesBySize(c._3[recLandSize]) | |
572 | 586 | let claimResult = claimAll(addr, landAssetId, pieces) | |
573 | 587 | (((((claimResult._1 :+ BooleanEntry(activationKey, true)) :+ BooleanEntry(keyPresaleArtActivatedByAssetIdAndOwner(landAssetId, addr), true)) :+ IntegerEntry(keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId), pieces)) :+ IntegerEntry(keyLandArtStatusByTypeAssetIdAndOwner(ARTPRESALE, landAssetId, addr), pieces)) :+ StringEntry(claimResult._2, makeString(claimResult._3, ":"))) | |
574 | 588 | } | |
575 | 589 | } | |
576 | 590 | ||
577 | 591 | ||
578 | 592 | func mergeInternal (newLandSize,newLevel,formula,addr,landAssetIds,txId,needMat) = { | |
579 | 593 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(addr)), "You don't have a duck staked") | |
580 | 594 | func checkMerge (acc,landAssetId) = { | |
581 | 595 | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
582 | 596 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
583 | 597 | let savedTime = valueOrErrorMessage(getInteger(timeKey), (("NFT " + asset.name) + " is not staked")) | |
584 | 598 | let owner = valueOrErrorMessage(getString(keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned")) | |
585 | 599 | if ((owner != addr)) | |
586 | 600 | then throw((LANDPREFIX + " is not yours")) | |
587 | 601 | else { | |
588 | 602 | let d = split(asset.description, "_") | |
589 | 603 | let continent = d[recContinent] | |
590 | 604 | if (if ((acc._3 != "")) | |
591 | 605 | then (acc._3 != continent) | |
592 | 606 | else false) | |
593 | 607 | then throw("Lands should be on the same continent to merge") | |
594 | 608 | else { | |
595 | 609 | let landSize = d[recLandSize] | |
596 | 610 | let sizesIn = acc._1 | |
597 | 611 | let i = valueOrErrorMessage(indexOf(sizesIn, landSize), "You haven't passed all the lands needed") | |
598 | 612 | let sizesOut = (take(sizesIn, i) + drop(sizesIn, (i + 1))) | |
599 | 613 | let pieces = numPiecesBySize(landSize) | |
600 | 614 | let arts = (acc._2 + valueOrElse(getInteger(keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId)), if (valueOrElse(getBoolean(keyPresaleArtActivatedByAssetId(landAssetId)), false)) | |
601 | 615 | then pieces | |
602 | 616 | else 0)) | |
603 | 617 | let infraLevel = valueOrElse(getInteger(keyInfraLevelByAssetId(landAssetId)), 0) | |
604 | 618 | let reqLevel = match landSize { | |
605 | 619 | case _ => | |
606 | 620 | if (("S" == $match0)) | |
607 | 621 | then 3 | |
608 | 622 | else if (("M" == $match0)) | |
609 | 623 | then 4 | |
610 | 624 | else if (("L" == $match0)) | |
611 | 625 | then 5 | |
612 | 626 | else if (("XL" == $match0)) | |
613 | 627 | then 6 | |
614 | 628 | else throw("Only S, M, L, XL can merge") | |
615 | 629 | } | |
616 | 630 | if ((infraLevel != reqLevel)) | |
617 | 631 | then throw("All lands should be maxed to merge") | |
618 | 632 | else { | |
619 | 633 | let landNum = d[recLandNum] | |
620 | 634 | let terrainCounts = countTerrains(d[recTerrains]) | |
621 | 635 | let deltaTime = (lastBlock.timestamp - savedTime) | |
622 | 636 | if ((0 > deltaTime)) | |
623 | 637 | then throw(((("Saved timestamp is in future, saved = " + toString(savedTime)) + ", current = ") + toString(lastBlock.timestamp))) | |
624 | 638 | else { | |
625 | 639 | let dailyProductionByPiece = applyBonuses(landAssetId, pieces) | |
626 | - | let bpRes = addRes(split(acc._4, "_"), terrainCounts, deltaTime, (pieces / | |
627 | - | let props = updateProportionsInternal(split(acc._6, "_"), terrainCounts, (pieces / | |
640 | + | let bpRes = addRes(split(acc._4, "_"), terrainCounts, deltaTime, (pieces / SSIZE), dailyProductionByPiece) | |
641 | + | let props = updateProportionsInternal(split(acc._6, "_"), terrainCounts, (pieces / SSIZE), -1) | |
628 | 642 | $Tuple6(sizesOut, arts, continent, bpRes, (((((((((((((acc._5 :+ DeleteEntry(keyStakedTimeByAssetId(landAssetId))) :+ DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, addr))) :+ DeleteEntry(keyLandToAssetId(landNum))) :+ DeleteEntry(keyNftName(landNum, landSize))) :+ DeleteEntry(keyLandAssetIdToOwner(landAssetId))) :+ DeleteEntry(keyInfraLevelByAssetId(landAssetId))) :+ DeleteEntry(keyInfraLevelByAssetIdAndOwner(landAssetId, addr))) :+ DeleteEntry(keyPresaleArtActivatedByAssetId(landAssetId))) :+ DeleteEntry(keyPresaleArtActivatedByAssetIdAndOwner(landAssetId, addr))) :+ DeleteEntry(keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId))) :+ DeleteEntry(keyLandArtStatusByTypeAssetIdAndOwner(ARTPRESALE, landAssetId, addr))) :+ DeleteEntry(keyLandNumToOwner(landNum))) :+ Burn(fromBase58String(landAssetId), 1)), props) | |
629 | 643 | } | |
630 | 644 | } | |
631 | 645 | } | |
632 | 646 | } | |
633 | 647 | } | |
634 | 648 | ||
635 | 649 | let bpKey = keyBackpackByDuck(duckAssetId) | |
636 | 650 | let currentPack = getBackpack(bpKey) | |
637 | 651 | let propStr = valueOrElse(getString(keyResProportions()), "0_0_0_0_0_0") | |
638 | 652 | let r = { | |
639 | 653 | let $l = landAssetIds | |
640 | 654 | let $s = size($l) | |
641 | 655 | let $acc0 = $Tuple6(formula, 0, "", currentPack[bpIdxRes], nil, propStr) | |
642 | 656 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
643 | 657 | then $a | |
644 | 658 | else checkMerge($a, $l[$i]) | |
645 | 659 | ||
646 | 660 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
647 | 661 | then $a | |
648 | 662 | else throw("List size exceeds 4") | |
649 | 663 | ||
650 | 664 | $f0_2($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4) | |
651 | 665 | } | |
652 | 666 | let continent = r._3 | |
653 | 667 | let continentIdx = valueOrErrorMessage(indexOf(continents, continent), ("Unknown continent: " + continent)) | |
654 | 668 | let terrains = genTerrains(abs(toBigInt(txId)), continentIdx) | |
655 | - | let freeNum = valueOrElse(getInteger(keyNextFreeLandNum()), | |
669 | + | let freeNum = valueOrElse(getInteger(keyNextFreeLandNum()), (PRESALENUMLANDS + 1)) | |
656 | 670 | let newLandNum = toString(freeNum) | |
657 | 671 | let issue = Issue(keyNftName(newLandNum, newLandSize), makeString([newLandNum, newLandSize, terrains, continent], "_"), 1, 0, false) | |
658 | 672 | let assetId = calculateAssetId(issue) | |
659 | 673 | let newLandAssetId = toBase58String(assetId) | |
660 | 674 | let newMat = makeString(subtractMaterials((needMat > 0), split(currentPack[bpIdxMat], "_"), needMat), "_") | |
661 | 675 | $Tuple2((((((((((((((r._5 :+ IntegerEntry(keyNextFreeLandNum(), (freeNum + 1))) :+ issue) :+ StringEntry(keyLandToAssetId(newLandNum), newLandAssetId)) :+ StringEntry(keyLandAssetIdToOwner(newLandAssetId), addr)) :+ StringEntry(keyLandNumToOwner(newLandNum), addr)) :+ IntegerEntry(keyLandArtStatusByTypeAndAssetId(ARTPRESALE, newLandAssetId), r._2)) :+ IntegerEntry(keyLandArtStatusByTypeAssetIdAndOwner(ARTPRESALE, newLandAssetId, addr), r._2)) :+ IntegerEntry(keyInfraLevelByAssetId(newLandAssetId), newLevel)) :+ IntegerEntry(keyInfraLevelByAssetIdAndOwner(newLandAssetId, addr), newLevel)) :+ StringEntry(bpKey, makeString([currentPack[bpIdxLevel], r._4, newMat, currentPack[bpIdxProd]], ":"))) :+ StringEntry(keyResProportions(), r._6)) :+ StringEntry(keyDuckLocation(duckAssetId), makeString([continent, "L", newLandAssetId], "_"))) :+ ScriptTransfer(addressFromStringValue(addr), 1, assetId)), newLandAssetId) | |
662 | 676 | } | |
663 | 677 | ||
664 | 678 | ||
665 | 679 | func s2m (addr,landAssetIds,txId) = mergeInternal("M", 3, "SSSS", addr, landAssetIds, txId, 0) | |
666 | 680 | ||
667 | 681 | ||
668 | 682 | func m2l (addr,landAssetIds,txId,shouldUseMat,paymentAmount) = { | |
669 | 683 | let cost = (InfraUpgradeCostSUsdn * 4) | |
670 | 684 | if (if (!(shouldUseMat)) | |
671 | 685 | then (paymentAmount != cost) | |
672 | 686 | else false) | |
673 | 687 | then throw(("Payment attached should be " + toString(cost))) | |
674 | 688 | else mergeInternal("L", 4, "SMM", addr, landAssetIds, txId, (InfraUpgradeCostS * 4)) | |
675 | 689 | } | |
676 | 690 | ||
677 | 691 | ||
678 | 692 | func l2xl (addr,landAssetIds,txId,shouldUseMat,paymentAmount) = { | |
679 | 693 | let cost = (InfraUpgradeCostSUsdn * 47) | |
680 | 694 | if (if (!(shouldUseMat)) | |
681 | 695 | then (paymentAmount != cost) | |
682 | 696 | else false) | |
683 | 697 | then throw(("Payment attached should be " + toString(cost))) | |
684 | 698 | else mergeInternal("XL", 5, "SSSML", addr, landAssetIds, txId, (InfraUpgradeCostS * 47)) | |
685 | 699 | } | |
686 | 700 | ||
687 | 701 | ||
688 | 702 | func xl2xxl (addr,landAssetIds,txId,shouldUseMat,paymentAmount) = { | |
689 | 703 | let cost = (InfraUpgradeCostSUsdn * 54) | |
690 | 704 | if (if (!(shouldUseMat)) | |
691 | 705 | then (paymentAmount != cost) | |
692 | 706 | else false) | |
693 | 707 | then throw(("Payment attached should be " + toString(cost))) | |
694 | 708 | else mergeInternal("XXL", 6, "LXL", addr, landAssetIds, txId, (InfraUpgradeCostS * 54)) | |
695 | 709 | } | |
696 | 710 | ||
697 | 711 | ||
698 | 712 | func mergeCommon (shouldUseMat,addr,paymentAmount,landAssetIds,txId) = { | |
699 | 713 | let mergeResult = match size(landAssetIds) { | |
700 | 714 | case _ => | |
701 | 715 | if ((4 == $match0)) | |
702 | 716 | then s2m(addr, landAssetIds, txId) | |
703 | 717 | else if ((3 == $match0)) | |
704 | 718 | then m2l(addr, landAssetIds, txId, shouldUseMat, paymentAmount) | |
705 | 719 | else if ((5 == $match0)) | |
706 | 720 | then l2xl(addr, landAssetIds, txId, shouldUseMat, paymentAmount) | |
707 | 721 | else if ((2 == $match0)) | |
708 | 722 | then xl2xxl(addr, landAssetIds, txId, shouldUseMat, paymentAmount) | |
709 | 723 | else throw("Unknown merge") | |
710 | 724 | } | |
711 | 725 | mergeResult | |
712 | 726 | } | |
713 | 727 | ||
714 | 728 | ||
715 | 729 | @Callable(i) | |
716 | - | func stakeLand () = { | |
717 | - | let pmt = value(i.payments[0]) | |
718 | - | let assetId = value(pmt.assetId) | |
719 | - | let address = toString(i.caller) | |
720 | - | if ((pmt.amount != 1)) | |
721 | - | then throw((("NFT " + LANDPREFIX) + " token should be attached as payment")) | |
722 | - | else { | |
723 | - | let asset = value(assetInfo(assetId)) | |
724 | - | if ((asset.issuer != this)) | |
725 | - | then throw("Unknown issuer of token") | |
726 | - | else if (!(contains(asset.name, LANDPREFIX))) | |
727 | - | then throw((("Only NFT " + LANDPREFIX) + " tokens are accepted")) | |
728 | - | else { | |
729 | - | let landNumSize = drop(asset.name, 4) | |
730 | - | let landNum = if (contains(landNumSize, "XXL")) | |
731 | - | then dropRight(landNumSize, 3) | |
732 | - | else if (contains(landNumSize, "XL")) | |
733 | - | then dropRight(landNumSize, 2) | |
734 | - | else dropRight(landNumSize, 1) | |
735 | - | let landNumInt = valueOrErrorMessage(parseInt(landNum), ("Cannot parse land number from " + asset.name)) | |
736 | - | let landAssetId = toBase58String(assetId) | |
737 | - | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
738 | - | if (isDefined(getInteger(timeKey))) | |
739 | - | then throw((("NFT " + asset.name) + " is already staked")) | |
740 | - | else { | |
741 | - | let d = split(asset.description, "_") | |
742 | - | let terrainCounts = countTerrains(d[recTerrains]) | |
743 | - | let props = updateProportions(terrainCounts, (numPiecesBySize(d[recLandSize]) / 25), 1) | |
730 | + | func stakeLand () = if ((size(i.payments) != 1)) | |
731 | + | then throw("Exactly one payment required") | |
732 | + | else { | |
733 | + | let pmt = value(i.payments[0]) | |
734 | + | let assetId = value(pmt.assetId) | |
735 | + | let address = toString(i.caller) | |
736 | + | if ((pmt.amount != 1)) | |
737 | + | then throw((("NFT " + LANDPREFIX) + " token should be attached as payment")) | |
738 | + | else { | |
739 | + | let asset = value(assetInfo(assetId)) | |
740 | + | if ((asset.issuer != this)) | |
741 | + | then throw("Unknown issuer of token") | |
742 | + | else if (!(contains(asset.name, LANDPREFIX))) | |
743 | + | then throw((("Only NFT " + LANDPREFIX) + " tokens are accepted")) | |
744 | + | else { | |
745 | + | let landNumSize = drop(asset.name, 4) | |
746 | + | let landNum = if (contains(landNumSize, "XXL")) | |
747 | + | then dropRight(landNumSize, 3) | |
748 | + | else if (contains(landNumSize, "XL")) | |
749 | + | then dropRight(landNumSize, 2) | |
750 | + | else dropRight(landNumSize, 1) | |
751 | + | if (!(isDefined(parseInt(landNum)))) | |
752 | + | then throw(("Cannot parse land number from " + asset.name)) | |
753 | + | else { | |
754 | + | let landAssetId = toBase58String(assetId) | |
755 | + | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
756 | + | if (isDefined(getInteger(timeKey))) | |
757 | + | then throw((("NFT " + asset.name) + " is already staked")) | |
758 | + | else { | |
759 | + | let d = split(asset.description, "_") | |
760 | + | let terrainCounts = countTerrains(d[recTerrains]) | |
761 | + | let props = updateProportions(terrainCounts, (numPiecesBySize(d[recLandSize]) / SSIZE), 1) | |
744 | 762 | [IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, address), lastBlock.timestamp), StringEntry(keyLandAssetIdToOwner(landAssetId), address), StringEntry(keyLandNumToOwner(landNum), address), StringEntry(keyResProportions(), props)] | |
745 | - | } | |
746 | - | } | |
747 | - | } | |
748 | - | } | |
763 | + | } | |
764 | + | } | |
765 | + | } | |
766 | + | } | |
767 | + | } | |
749 | 768 | ||
750 | 769 | ||
751 | 770 | ||
752 | 771 | @Callable(i) | |
753 | 772 | func unstakeLand (landAssetIdStr) = if ((size(i.payments) != 0)) | |
754 | 773 | then throw("unstake doesn't require any payments") | |
755 | 774 | else { | |
756 | 775 | let addr = toString(i.caller) | |
757 | 776 | let c = checkClaimConditions(addr) | |
758 | 777 | let terrainCounts = countTerrains(c._3[recTerrains]) | |
759 | 778 | let pieces = numPiecesBySize(c._3[recLandSize]) | |
760 | - | let props = updateProportions(terrainCounts, (pieces / | |
779 | + | let props = updateProportions(terrainCounts, (pieces / SSIZE), -1) | |
761 | 780 | let claimResult = claimAll(addr, c._2, pieces) | |
762 | 781 | [ScriptTransfer(i.caller, 1, fromBase58String(c._2)), DeleteEntry(keyStakedTimeByAssetId(c._2)), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, c._2, addr)), StringEntry(keyResProportions(), props), StringEntry(claimResult._2, makeString(claimResult._3, ":"))] | |
763 | 782 | } | |
764 | 783 | ||
765 | 784 | ||
766 | 785 | ||
767 | 786 | @Callable(i) | |
768 | - | func stakeDuck () = { | |
769 | - | let pmt = value(i.payments[0]) | |
770 | - | let assetId = value(pmt.assetId) | |
771 | - | let address = toString(i.caller) | |
772 | - | if ((pmt.amount != 1)) | |
773 | - | then throw((("NFT " + DUCKPREFIX) + " token should be attached as payment")) | |
774 | - | else { | |
775 | - | let asset = value(assetInfo(assetId)) | |
776 | - | if (if ((asset.issuer != incubatorAddr)) | |
777 | - | then (asset.issuer != breederAddr) | |
778 | - | else false) | |
779 | - | then throw((("Unknown issuer of " + DUCKPREFIX) + " token")) | |
780 | - | else if (!(contains(asset.name, DUCKPREFIX))) | |
781 | - | then throw((("Only NFT " + DUCKPREFIX) + " tokens are accepted")) | |
782 | - | else { | |
783 | - | let assetIdStr = toBase58String(assetId) | |
784 | - | let timeKey = keyStakedTimeByAssetId(assetIdStr) | |
785 | - | if (isDefined(getInteger(timeKey))) | |
786 | - | then throw((("NFT " + asset.name) + " is already staked")) | |
787 | - | else if (isDefined(getString(keyStakedDuckByOwner(address)))) | |
788 | - | then throw(("You already staked one duck: " + asset.name)) | |
789 | - | else { | |
790 | - | let locKey = keyDuckLocation(assetIdStr) | |
791 | - | let location = getString(locKey) | |
792 | - | let keyHealth = keyDuckHealth(assetIdStr) | |
793 | - | let health = getInteger(keyHealth) | |
794 | - | let bpKey = keyBackpackByDuck(assetIdStr) | |
795 | - | let backpack = getString(bpKey) | |
796 | - | ([IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry(keyDuckIdToOwner(assetIdStr), address), StringEntry(keyStakedDuckByOwner(address), assetIdStr)] ++ (if (isDefined(location)) | |
797 | - | then nil | |
798 | - | else ([StringEntry(locKey, DEFAULTLOCATION)] ++ (if (isDefined(health)) | |
787 | + | func stakeDuck () = if ((size(i.payments) != 1)) | |
788 | + | then throw("Exactly one payment required") | |
789 | + | else { | |
790 | + | let pmt = value(i.payments[0]) | |
791 | + | let assetId = value(pmt.assetId) | |
792 | + | let address = toString(i.caller) | |
793 | + | if ((pmt.amount != 1)) | |
794 | + | then throw((("NFT " + DUCKPREFIX) + " token should be attached as payment")) | |
795 | + | else { | |
796 | + | let asset = value(assetInfo(assetId)) | |
797 | + | if (if ((asset.issuer != incubatorAddr)) | |
798 | + | then (asset.issuer != breederAddr) | |
799 | + | else false) | |
800 | + | then throw((("Unknown issuer of " + DUCKPREFIX) + " token")) | |
801 | + | else if (!(contains(asset.name, DUCKPREFIX))) | |
802 | + | then throw((("Only NFT " + DUCKPREFIX) + " tokens are accepted")) | |
803 | + | else { | |
804 | + | let assetIdStr = toBase58String(assetId) | |
805 | + | let timeKey = keyStakedTimeByAssetId(assetIdStr) | |
806 | + | if (isDefined(getInteger(timeKey))) | |
807 | + | then throw((("NFT " + asset.name) + " is already staked")) | |
808 | + | else if (isDefined(getString(keyStakedDuckByOwner(address)))) | |
809 | + | then throw(("You already staked one duck: " + asset.name)) | |
810 | + | else { | |
811 | + | let locKey = keyDuckLocation(assetIdStr) | |
812 | + | let location = getString(locKey) | |
813 | + | let bpKey = keyBackpackByDuck(assetIdStr) | |
814 | + | let backpack = getString(bpKey) | |
815 | + | ([IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry(keyDuckIdToOwner(assetIdStr), address), StringEntry(keyStakedDuckByOwner(address), assetIdStr)] ++ (if (isDefined(location)) | |
799 | 816 | then nil | |
800 | - | else ([ | |
817 | + | else ([StringEntry(locKey, DEFAULTLOCATION)] ++ (if (isDefined(backpack)) | |
801 | 818 | then nil | |
802 | - | else [StringEntry(bpKey, "0:0_0_0_0_0_0:0_0_0_0_0_0:")])))))) | |
803 | - | } | |
804 | - | } | |
805 | - | } | |
806 | - | } | |
819 | + | else ([StringEntry(bpKey, "0:0_0_0_0_0_0:0_0_0_0_0_0:")] :+ IntegerEntry(keyDuckHealth(assetIdStr), 100)))))) | |
820 | + | } | |
821 | + | } | |
822 | + | } | |
823 | + | } | |
807 | 824 | ||
808 | 825 | ||
809 | 826 | ||
810 | 827 | @Callable(i) | |
811 | 828 | func unstakeDuck (assetIdStr) = if ((size(i.payments) != 0)) | |
812 | 829 | then throw("unstake doesn't require any payments") | |
813 | 830 | else { | |
814 | 831 | let assetId = fromBase58String(assetIdStr) | |
815 | 832 | let address = toString(i.caller) | |
816 | 833 | let asset = value(assetInfo(assetId)) | |
817 | - | if (if ((asset.issuer != incubatorAddr)) | |
818 | - | then (asset.issuer != breederAddr) | |
819 | - | else false) | |
820 | - | then throw((("Unknown issuer of " + DUCKPREFIX) + " token")) | |
821 | - | else if (!(contains(asset.name, DUCKPREFIX))) | |
822 | - | then throw((("Only NFT " + DUCKPREFIX) + " tokens can be unstaked")) | |
834 | + | let timeKey = keyStakedTimeByAssetId(toBase58String(assetId)) | |
835 | + | if (!(isDefined(timeKey))) | |
836 | + | then throw((("NFT " + asset.name) + " is not staked")) | |
837 | + | else if (!(isDefined(keyStakedDuckByOwner(address)))) | |
838 | + | then throw((("The duck " + asset.name) + " is not staked")) | |
823 | 839 | else { | |
824 | - | let timeKey = keyStakedTimeByAssetId(toBase58String(assetId)) | |
825 | - | if (!(isDefined(timeKey))) | |
826 | - | then throw((("NFT " + asset.name) + " is not staked")) | |
827 | - | else if (!(isDefined(keyStakedDuckByOwner(address)))) | |
828 | - | then throw((("The duck " + asset.name) + " is not staked")) | |
829 | - | else { | |
830 | - | let owner = valueOrErrorMessage(getString(keyDuckIdToOwner(toBase58String(assetId))), (("NFT " + asset.name) + " is orphaned")) | |
831 | - | if ((owner != address)) | |
832 | - | then throw("Staked NFT is not yours") | |
833 | - | else [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(timeKey), DeleteEntry(keyDuckLocation(assetIdStr)), DeleteEntry(keyDuckIdToOwner(assetIdStr)), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, assetIdStr, address)), DeleteEntry(keyStakedDuckByOwner(address))] | |
834 | - | } | |
840 | + | let owner = valueOrErrorMessage(getString(keyDuckIdToOwner(toBase58String(assetId))), (("NFT " + asset.name) + " is orphaned")) | |
841 | + | if ((owner != address)) | |
842 | + | then throw("Staked NFT is not yours") | |
843 | + | else { | |
844 | + | let keyHealth = keyDuckHealth(assetIdStr) | |
845 | + | let health = getInteger(keyHealth) | |
846 | + | if ((health != 100)) | |
847 | + | then throw("Please heal your duck before unstaking") | |
848 | + | else [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(timeKey), DeleteEntry(keyHealth), DeleteEntry(keyDuckLocation(assetIdStr)), DeleteEntry(keyDuckIdToOwner(assetIdStr)), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, assetIdStr, address)), DeleteEntry(keyStakedDuckByOwner(address))] | |
849 | + | } | |
835 | 850 | } | |
836 | 851 | } | |
837 | 852 | ||
838 | 853 | ||
839 | 854 | ||
840 | 855 | @Callable(i) | |
841 | 856 | func claimRes (amount,landAssetIdStr) = if ((size(i.payments) != 0)) | |
842 | 857 | then throw("claimRes doesn't require any payments") | |
843 | 858 | else { | |
844 | 859 | let addr = toString(i.originCaller) | |
845 | 860 | let result = claimResInternal(addr, amount) | |
846 | 861 | $Tuple2((result._1 :+ StringEntry(result._2, makeString(result._3, ":"))), result._3[bpIdxRes]) | |
847 | 862 | } | |
848 | 863 | ||
849 | 864 | ||
850 | 865 | ||
851 | 866 | @Callable(i) | |
852 | 867 | func flight (message,sig) = if (!(sigVerify_8Kb(message, sig, pub))) | |
853 | 868 | then throw("signature does not match") | |
854 | 869 | else if ((size(i.payments) != 0)) | |
855 | 870 | then throw("flight doesn't require any payments") | |
856 | 871 | else { | |
857 | 872 | let parts = split(toUtf8String(message), ";") | |
858 | 873 | let hp = split(split(parts[0], "|")[0], "_") | |
859 | 874 | let curHP = parseIntValue(hp[0]) | |
860 | 875 | let newHP = parseIntValue(hp[1]) | |
861 | 876 | let newLocAndTime = split(parts[1], ":") | |
862 | 877 | let newLocation = newLocAndTime[0] | |
863 | 878 | let time = parseIntValue(newLocAndTime[1]) | |
864 | 879 | if (if ((time > (lastBlock.timestamp + FIVEMINUTESMILLIS))) | |
865 | 880 | then true | |
866 | 881 | else ((lastBlock.timestamp - FIVEMINUTESMILLIS) > time)) | |
867 | 882 | then throw("signature outdated") | |
868 | 883 | else { | |
869 | 884 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
870 | 885 | let keyHealth = keyDuckHealth(duckAssetId) | |
871 | 886 | let oldFromState = valueOrElse(getInteger(keyHealth), 100) | |
872 | 887 | if ((oldFromState != curHP)) | |
873 | 888 | then throw(((("oldHealth=" + toString(valueOrElse(getInteger(keyHealth), 100))) + " from state does not match one from flight log=") + toString(curHP))) | |
874 | 889 | else if ((0 >= curHP)) | |
875 | 890 | then throw("You can't fly with zero health") | |
876 | 891 | else { | |
877 | 892 | let locKey = keyDuckLocation(duckAssetId) | |
878 | 893 | let curLocation = valueOrElse(getString(locKey), DEFAULTLOCATION) | |
879 | 894 | if ((newLocation == curLocation)) | |
880 | 895 | then throw("You can't fly to the same location") | |
881 | 896 | else $Tuple2([StringEntry(locKey, if ((newHP > 0)) | |
882 | 897 | then newLocation | |
883 | 898 | else curLocation), IntegerEntry(keyHealth, newHP)], unit) | |
884 | 899 | } | |
885 | 900 | } | |
886 | 901 | } | |
887 | 902 | ||
888 | 903 | ||
889 | 904 | ||
890 | 905 | @Callable(i) | |
891 | 906 | func setHealth (health,duckAssetId) = if (if ((0 > health)) | |
892 | 907 | then true | |
893 | 908 | else (health > 100)) | |
894 | 909 | then throw("HP should be within 0..100") | |
895 | 910 | else [IntegerEntry(keyDuckHealth(duckAssetId), health)] | |
896 | 911 | ||
897 | 912 | ||
898 | 913 | ||
899 | 914 | @Callable(i) | |
900 | 915 | func heal (matType,amount) = if (if ((0 > matType)) | |
901 | 916 | then true | |
902 | 917 | else (matType >= NUMRES)) | |
903 | 918 | then throw(("Unknown material: " + toString(matType))) | |
904 | 919 | else if ((0 >= amount)) | |
905 | 920 | then throw(("Amount should be positive! " + toString(amount))) | |
906 | 921 | else { | |
907 | 922 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
908 | 923 | let keyHealth = keyDuckHealth(duckAssetId) | |
909 | 924 | let oldHealth = valueOrElse(getInteger(keyHealth), 100) | |
910 | 925 | if ((oldHealth >= 100)) | |
911 | 926 | then throw("HP should be < 100 to heal") | |
912 | 927 | else { | |
913 | 928 | let bpKey = keyBackpackByDuck(duckAssetId) | |
914 | 929 | let currentPack = getBackpack(bpKey) | |
915 | 930 | let mList = split(currentPack[bpIdxMat], "_") | |
916 | 931 | let currentAmount = parseIntValue(mList[matType]) | |
917 | 932 | let deltaHealth = min([(amount / HEALCOST), (100 - oldHealth)]) | |
918 | 933 | let spendAmount = (deltaHealth * HEALCOST) | |
919 | 934 | if ((spendAmount > currentAmount)) | |
920 | 935 | then throw(((((("You need " + toString(spendAmount)) + " of ") + matTypes[matType]) + " to heal, but you backpack contains ") + toString(currentAmount))) | |
921 | 936 | else { | |
922 | 937 | let newMat = subOneInList(mList, matType, spendAmount) | |
923 | 938 | [IntegerEntry(keyHealth, (oldHealth + deltaHealth)), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], newMat, currentPack[bpIdxProd]], ":"))] | |
924 | 939 | } | |
925 | 940 | } | |
926 | 941 | } | |
927 | 942 | ||
928 | 943 | ||
929 | 944 | ||
930 | 945 | @Callable(i) | |
931 | 946 | func updateBackpack (duckAssetId,newPack) = if ((i.caller != economyAddr)) | |
932 | 947 | then throw("permission denied") | |
933 | 948 | else $Tuple2([StringEntry(keyBackpackByDuck(duckAssetId), newPack)], newPack) | |
934 | 949 | ||
935 | 950 | ||
936 | 951 | ||
937 | 952 | @Callable(i) | |
938 | 953 | func expeditionBuy (message,sig) = if ((size(i.payments) != 1)) | |
939 | 954 | then throw("Exactly one payment required") | |
940 | 955 | else { | |
941 | 956 | let pmt = value(i.payments[0]) | |
942 | 957 | if ((pmt.assetId != usdnAssetId)) | |
943 | 958 | then throw("Allowed USDN payment only!") | |
944 | 959 | else if ((pmt.amount != EXPUSDN)) | |
945 | 960 | then throw(("Payment attached should be " + toString(EXPUSDN))) | |
946 | 961 | else { | |
947 | 962 | let result = expeditionCommon(false, i.caller, i.transactionId, message, sig) | |
948 | - | $Tuple2((result._1 :+ ScriptTransfer(economyAddr, pmt.amount, usdnAssetId)), result._2) | |
963 | + | if ((result._2 == "")) | |
964 | + | then result | |
965 | + | else $Tuple2((result._1 :+ ScriptTransfer(economyAddr, pmt.amount, usdnAssetId)), result._2) | |
949 | 966 | } | |
950 | 967 | } | |
951 | 968 | ||
952 | 969 | ||
953 | 970 | ||
954 | 971 | @Callable(i) | |
955 | 972 | func expedition (message,sig) = if ((size(i.payments) != 0)) | |
956 | 973 | then throw("expedition doesn't require any payments") | |
957 | 974 | else expeditionCommon(true, i.caller, i.transactionId, message, sig) | |
958 | 975 | ||
959 | 976 | ||
960 | 977 | ||
961 | 978 | @Callable(i) | |
962 | 979 | func upgradeInfra (landAssetIdIgnored) = if ((size(i.payments) != 0)) | |
963 | 980 | then throw("Infrastructure upgrade doesn't require any payments") | |
964 | 981 | else upInfraCommon(true, i.caller, 0) | |
965 | 982 | ||
966 | 983 | ||
967 | 984 | ||
968 | 985 | @Callable(i) | |
969 | 986 | func upgradeInfraUsdn (landAssetIdIgnored) = if ((size(i.payments) != 1)) | |
970 | 987 | then throw("Exactly one payment required") | |
971 | 988 | else { | |
972 | 989 | let pmt = value(i.payments[0]) | |
973 | 990 | if ((pmt.assetId != usdnAssetId)) | |
974 | 991 | then throw("Allowed USDN payment only!") | |
975 | 992 | else { | |
976 | 993 | let result = upInfraCommon(false, i.caller, pmt.amount) | |
977 | 994 | $Tuple2((result._1 :+ ScriptTransfer(economyAddr, pmt.amount, usdnAssetId)), result._2) | |
978 | 995 | } | |
979 | 996 | } | |
980 | 997 | ||
981 | 998 | ||
982 | 999 | ||
983 | 1000 | @Callable(i) | |
984 | 1001 | func activateArtifact (artName) = if ((size(i.payments) != 0)) | |
985 | 1002 | then throw("Artifact activation doesn't require any payments") | |
986 | 1003 | else { | |
987 | 1004 | let result = match artName { | |
988 | 1005 | case _ => | |
989 | 1006 | if (("PRESALE" == $match0)) | |
990 | 1007 | then activatePresaleArt(toString(i.caller)) | |
991 | 1008 | else throw("Unknown artifact") | |
992 | 1009 | } | |
993 | 1010 | result | |
994 | 1011 | } | |
995 | 1012 | ||
996 | 1013 | ||
997 | 1014 | ||
998 | 1015 | @Callable(i) | |
999 | 1016 | func mergeLands (landAssetIds) = if ((size(i.payments) != 0)) | |
1000 | 1017 | then throw("Lands merging doesn't require any payments") | |
1001 | 1018 | else mergeCommon(true, toString(i.caller), 0, landAssetIds, i.transactionId) | |
1002 | 1019 | ||
1003 | 1020 | ||
1004 | 1021 | ||
1005 | 1022 | @Callable(i) | |
1006 | 1023 | func mergeLandsUsdn (landAssetIds) = if ((size(i.payments) != 1)) | |
1007 | 1024 | then throw("Exactly one payment required") | |
1008 | 1025 | else { | |
1009 | 1026 | let pmt = value(i.payments[0]) | |
1010 | 1027 | if ((pmt.assetId != usdnAssetId)) | |
1011 | 1028 | then throw("Allowed USDN payment only!") | |
1012 | 1029 | else { | |
1013 | 1030 | let result = mergeCommon(false, toString(i.caller), pmt.amount, landAssetIds, i.transactionId) | |
1014 | 1031 | $Tuple2((result._1 :+ ScriptTransfer(economyAddr, pmt.amount, usdnAssetId)), result._2) | |
1015 | 1032 | } | |
1016 | 1033 | } | |
1017 | 1034 | ||
1018 | 1035 |
github/deemru/w8io/169f3d6 118.69 ms ◑