tx · BMPLrL7JaYrzdyMqEQaof9Z2476EU7k8anQRKiWia9m7

3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm:  -0.03100000 Waves

2023.01.14 18:30 [2404806] smart account 3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm > SELF 0.00000000 Waves

{ "type": 13, "id": "BMPLrL7JaYrzdyMqEQaof9Z2476EU7k8anQRKiWia9m7", "fee": 3100000, "feeAssetId": null, "timestamp": 1673710228941, "version": 2, "chainId": 84, "sender": "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm", "senderPublicKey": "EVooykMNV691Venwp1dHUTBd7KWequzUcda57Wd3LQEX", "proofs": [ "4EqpJQDTMftV7615w7kKj97qY8GAiaYMNhrkxj4MVUvafTgRUm7AZBDhW9HC8oauioVxzzm6bR2h1cRBAPN1CQzG" ], "script": "base64:BgJTCAISABIDCgEIEgASAwoBCBIECgIBCBIECgICAhIECgIBCBIECgIBARIECgIICBIECgICAhIECgICAhIDCgEIEgMKAQgSAwoBCBIDCgEYEgMKARhWAAVjaGFpbgkAsAkBCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAAt1c2RuQXNzZXRJZAQHJG1hdGNoMAUFY2hhaW4DCQAAAgIBVwUHJG1hdGNoMAEgtiYpwwT1zlORpA5LdSQvZIxRsfrfr1QpvUjSHSqyqtEDCQAAAgIBVAUHJG1hdGNoMAEg93bq9/eDymXbbhPuAjvPWCmVqcHRjfJL2mzYHWKAyN4JAAIBAg1Vbmtub3duIGNoYWluAA1pbmN1YmF0b3JBZGRyBAckbWF0Y2gwBQVjaGFpbgMJAAACAgFXBQckbWF0Y2gwCQERQGV4dHJOYXRpdmUoMTA2MikBAiMzUEVrdFZ1eDJSaGNoU042M0RzRG80YjRtejRRcXpLU2VEdgMJAAACAgFUBQckbWF0Y2gwBQR0aGlzCQACAQINVW5rbm93biBjaGFpbgALYnJlZWRlckFkZHIEByRtYXRjaDAFBWNoYWluAwkAAAICAVcFByRtYXRjaDA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AMBCAUBaQhwYXltZW50cwABCQACAQIcRXhhY3RseSBvbmUgcGF5bWVudCByZXF1aXJlZAQDcG10CQEFdmFsdWUBCQCRAwIIBQFpCHBheW1lbnRzAAADCQECIT0CCAUDcG10B2Fzc2V0SWQFC3VzZG5Bc3NldElkCQACAQIaQWxsb3dlZCBVU0ROIHBheW1lbnQgb25seSEEBnJlc3VsdAkBC21lcmdlQ29tbW9uBQcJAKUIAQgFAWkGY2FsbGVyCAUDcG10BmFtb3VudAUMbGFuZEFzc2V0SWRzCAUBaQ10cmFuc2FjdGlvbklkCQCUCgIJAM0IAggFBnJlc3VsdAJfMQkBDlNjcmlwdFRyYW5zZmVyAwULZWNvbm9teUFkZHIIBQNwbXQGYW1vdW50BQt1c2RuQXNzZXRJZAgFBnJlc3VsdAJfMgDRLwz4", "height": 2404806, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GHnDLx9fbaZCDDUUZzSTzCGjWtWvrC3bi3Dnq8Zj8HgV Next: ESx94b7ZFJufZ3G1VNP6MNoB8gTVpkJoQ42tTVDbWA37 Diff:
OldNewDifferences
113113
114114 let continents = ["Asia", "Europe", "Americas", "Oceania", "Africa"]
115115
116+let ARTPRESALE = "PRESALE"
117+
116118 func keyNextFreeLandNum () = "nextLandNum"
117119
118120
141143
142144
143145 func keyPresaleArtActivatedByAssetIdAndOwner (assetId,ownerAddr) = ((("presaleArtActivatedByAssetIdAndOwner_" + assetId) + "_") + ownerAddr)
146+
147+
148+func keyLandArtStatusByTypeAndAssetId (type,assetId) = makeString(["landArtStatus", type, assetId], "_")
149+
150+
151+func keyLandArtStatusByTypeAssetIdAndOwner (type,assetId,ownerAddr) = makeString(["landArtStatusByTypeAssetIdAndOwner", type, assetId, ownerAddr], "_")
144152
145153
146154 func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr)
252260 }
253261
254262
263+func updateProportionsInternal (propList,terrainCounts,landSizeIndex,sign) = if ((size(propList) != NUMRES))
264+ then throw("Wrong proportions data")
265+ else {
266+ func updater (acc,i) = {
267+ let result = (parseIntValue(propList[i]) + ((sign * terrainCounts[i]) * landSizeIndex))
268+ if ((0 > result))
269+ then throw(((((((("Panic! Pieces of type=" + toString(i)) + ", sign=") + toString(sign)) + ", terrainCounts[i]=") + toString(terrainCounts[i])) + ", landSizeIndex=") + toString(landSizeIndex)))
270+ else (acc :+ toString(result))
271+ }
272+
273+ let r = {
274+ let $l = [0, 1, 2, 3, 4, 5]
275+ let $s = size($l)
276+ let $acc0 = nil
277+ func $f0_1 ($a,$i) = if (($i >= $s))
278+ then $a
279+ else updater($a, $l[$i])
280+
281+ func $f0_2 ($a,$i) = if (($i >= $s))
282+ then $a
283+ else throw("List size exceeds 6")
284+
285+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
286+ }
287+ makeString(r, "_")
288+ }
289+
290+
255291 func updateProportions (terrainCounts,landSizeIndex,sign) = {
256- let props = split(valueOrElse(getString(keyResProportions()), "0_0_0_0_0_0"), "_")
257- if ((size(props) != NUMRES))
258- then throw("Wrong proportions data")
259- else {
260- func updater (acc,i) = {
261- let result = (parseIntValue(props[i]) + ((sign * terrainCounts[i]) * landSizeIndex))
262- if ((0 > result))
263- then throw(((((((("Panic! Pieces of type=" + toString(i)) + ", sign=") + toString(sign)) + ", terrainCounts[i]=") + toString(terrainCounts[i])) + ", landSizeIndex=") + toString(landSizeIndex)))
264- else (acc :+ toString(result))
265- }
266-
267- let r = {
268- let $l = [0, 1, 2, 3, 4, 5]
269- let $s = size($l)
270- let $acc0 = nil
271- func $f0_1 ($a,$i) = if (($i >= $s))
272- then $a
273- else updater($a, $l[$i])
274-
275- func $f0_2 ($a,$i) = if (($i >= $s))
276- then $a
277- else throw("List size exceeds 6")
278-
279- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
280- }
281- makeString(r, "_")
282- }
292+ let propList = split(valueOrElse(getString(keyResProportions()), "0_0_0_0_0_0"), "_")
293+ updateProportionsInternal(propList, terrainCounts, landSizeIndex, sign)
283294 }
284295
285296
373384 }
374385
375386
387+func genTerrains (seed,continentIdx) = {
388+ let f = freq[continentIdx]
389+ 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+
391+ let t = {
392+ let $l = [1, 2, 3, 4, 5]
393+ let $s = size($l)
394+ let $acc0 = $Tuple2("", (seed / FIVEX))
395+ func $f0_1 ($a,$i) = if (($i >= $s))
396+ then $a
397+ else terrainGenerator($a, $l[$i])
398+
399+ func $f0_2 ($a,$i) = if (($i >= $s))
400+ then $a
401+ else throw("List size exceeds 5")
402+
403+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
404+ }
405+ t._1
406+ }
407+
408+
376409 func getBackpack (bpKey) = {
377410 let p = split(valueOrElse(getString(bpKey), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":")
378411 [toString(valueOrElse(parseInt(p[bpIdxLevel]), 0)), if ((size(split(p[bpIdxRes], "_")) == NUMRES))
422455 let freeNum = valueOrElse(getInteger(keyNextFreeLandNum()), 501)
423456 let landNum = toString(freeNum)
424457 let continentIdx = toInt((bigNum % FIVEX))
425- let f = freq[continentIdx]
426- 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))
427-
428- let t = {
429- let $l = [1, 2, 3, 4, 5]
430- let $s = size($l)
431- let $acc0 = $Tuple2("", (bigNum / FIVEX))
432- func $f0_1 ($a,$i) = if (($i >= $s))
433- then $a
434- else terrainGenerator($a, $l[$i])
435-
436- func $f0_2 ($a,$i) = if (($i >= $s))
437- then $a
438- else throw("List size exceeds 5")
439-
440- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
441- }
458+ let terrains = genTerrains(bigNum, continentIdx)
442459 let continent = continents[continentIdx]
443- let issue = Issue(keyNftName(landNum, "S"), makeString([landNum, "S", t._1, continent], "_"), 1, 0, false)
460+ let issue = Issue(keyNftName(landNum, "S"), makeString([landNum, "S", terrains, continent], "_"), 1, 0, false)
444461 let assetId = calculateAssetId(issue)
445462 let id = toBase58String(assetId)
446463 $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)
450467 }
451468
452469
453-func applyBonuses (landAssetId) = {
470+func applyBonuses (landAssetId,pieces) = {
454471 let infraLevel = valueOrElse(getInteger(keyInfraLevelByAssetId(landAssetId)), 0)
455- let presaleBonus = if (valueOrElse(getBoolean(keyPresaleArtActivatedByAssetId(landAssetId)), false))
456- then 3
457- else 0
458- ((DAILYRESBYPIECE + fraction(DAILYRESBYPIECE, infraLevel, 4)) + fraction(DAILYRESBYPIECE, presaleBonus, 20))
472+ let artPieces = valueOrElse(getInteger(keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId)), if (valueOrElse(getBoolean(keyPresaleArtActivatedByAssetId(landAssetId)), false))
473+ then pieces
474+ else 0)
475+ ((DAILYRESBYPIECE + fraction(DAILYRESBYPIECE, infraLevel, 4)) + fraction(DAILYRESBYPIECE, (artPieces * 3), (pieces * 20)))
459476 }
460477
461478
490507 then throw(((("Saved timestamp is in future, saved = " + toString(c._4)) + ", current = ") + toString(lastBlock.timestamp)))
491508 else {
492509 let pieces = numPiecesBySize(landSize)
493- let dailyProductionByPiece = applyBonuses(c._2)
510+ let dailyProductionByPiece = applyBonuses(c._2, pieces)
494511 let availRes = fraction(deltaTime, (dailyProductionByPiece * pieces), DAYMILLIS)
495512 if ((amount > availRes))
496513 then throw(((("Not enough resources, available = " + toString(availRes)) + ", requested = ") + toString(amount)))
510527 func claimAll (addr,landAssetId,pieces) = {
511528 let timeKey = keyStakedTimeByAssetId(landAssetId)
512529 let savedTime = value(getInteger(timeKey))
513- let availRes = (fraction((lastBlock.timestamp - savedTime), applyBonuses(landAssetId), DAYMILLIS) * pieces)
530+ let availRes = (fraction((lastBlock.timestamp - savedTime), applyBonuses(landAssetId, pieces), DAYMILLIS) * pieces)
514531 claimResInternal(addr, availRes)
515532 }
516533
544561
545562 func activatePresaleArt (addr) = {
546563 let c = checkClaimConditions(addr)
547- let activationKey = keyPresaleArtActivatedByAssetId(c._2)
564+ let landAssetId = c._2
565+ let activationKey = keyPresaleArtActivatedByAssetId(landAssetId)
548566 if (valueOrElse(getBoolean(activationKey), false))
549567 then throw("Presale artifact is already activated")
550568 else if ((parseIntValue(c._3[recLandNum]) > 500))
551- then throw((((LANDPREFIX + " ") + c._2) + " is not eligible for presale artifact"))
569+ then throw((((LANDPREFIX + " ") + landAssetId) + " is not eligible for presale artifact"))
552570 else {
553571 let pieces = numPiecesBySize(c._3[recLandSize])
554- let claimResult = claimAll(addr, c._2, pieces)
555- (((claimResult._1 :+ BooleanEntry(keyPresaleArtActivatedByAssetId(c._2), true)) :+ BooleanEntry(keyPresaleArtActivatedByAssetIdAndOwner(c._2, addr), true)) :+ StringEntry(claimResult._2, makeString(claimResult._3, ":")))
572+ let claimResult = claimAll(addr, landAssetId, pieces)
573+ (((((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, ":")))
556574 }
575+ }
576+
577+
578+func mergeInternal (newLandSize,newLevel,formula,addr,landAssetIds,txId,needMat) = {
579+ let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(addr)), "You don't have a duck staked")
580+ func checkMerge (acc,landAssetId) = {
581+ let asset = value(assetInfo(fromBase58String(landAssetId)))
582+ let timeKey = keyStakedTimeByAssetId(landAssetId)
583+ let savedTime = valueOrErrorMessage(getInteger(timeKey), (("NFT " + asset.name) + " is not staked"))
584+ let owner = valueOrErrorMessage(getString(keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
585+ if ((owner != addr))
586+ then throw((LANDPREFIX + " is not yours"))
587+ else {
588+ let d = split(asset.description, "_")
589+ let continent = d[recContinent]
590+ if (if ((acc._3 != ""))
591+ then (acc._3 != continent)
592+ else false)
593+ then throw("Lands should be on the same continent to merge")
594+ else {
595+ let landSize = d[recLandSize]
596+ let sizesIn = acc._1
597+ let i = valueOrErrorMessage(indexOf(sizesIn, landSize), "You haven't passed all the lands needed")
598+ let sizesOut = (take(sizesIn, i) + drop(sizesIn, (i + 1)))
599+ let pieces = numPiecesBySize(landSize)
600+ let arts = (acc._2 + valueOrElse(getInteger(keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId)), if (valueOrElse(getBoolean(keyPresaleArtActivatedByAssetId(landAssetId)), false))
601+ then pieces
602+ else 0))
603+ let infraLevel = valueOrElse(getInteger(keyInfraLevelByAssetId(landAssetId)), 0)
604+ let reqLevel = match landSize {
605+ case _ =>
606+ if (("S" == $match0))
607+ then 3
608+ else if (("M" == $match0))
609+ then 4
610+ else if (("L" == $match0))
611+ then 5
612+ else if (("XL" == $match0))
613+ then 6
614+ else throw("Only S, M, L, XL can merge")
615+ }
616+ if ((infraLevel != reqLevel))
617+ then throw("All lands should be maxed to merge")
618+ else {
619+ let landNum = d[recLandNum]
620+ let terrainCounts = countTerrains(d[recTerrains])
621+ let deltaTime = (lastBlock.timestamp - savedTime)
622+ if ((0 > deltaTime))
623+ then throw(((("Saved timestamp is in future, saved = " + toString(savedTime)) + ", current = ") + toString(lastBlock.timestamp)))
624+ else {
625+ let dailyProductionByPiece = applyBonuses(landAssetId, pieces)
626+ let bpRes = addRes(split(acc._4, "_"), terrainCounts, deltaTime, (pieces / 25), dailyProductionByPiece)
627+ let props = updateProportionsInternal(split(acc._6, "_"), terrainCounts, (pieces / 25), -1)
628+ $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+ }
630+ }
631+ }
632+ }
633+ }
634+
635+ let bpKey = keyBackpackByDuck(duckAssetId)
636+ let currentPack = getBackpack(bpKey)
637+ let propStr = valueOrElse(getString(keyResProportions()), "0_0_0_0_0_0")
638+ let r = {
639+ let $l = landAssetIds
640+ let $s = size($l)
641+ let $acc0 = $Tuple6(formula, 0, "", currentPack[bpIdxRes], nil, propStr)
642+ func $f0_1 ($a,$i) = if (($i >= $s))
643+ then $a
644+ else checkMerge($a, $l[$i])
645+
646+ func $f0_2 ($a,$i) = if (($i >= $s))
647+ then $a
648+ else throw("List size exceeds 4")
649+
650+ $f0_2($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4)
651+ }
652+ let continentIdx = valueOrErrorMessage(indexOf(continents, r._3), ("Unknown continent: " + r._3))
653+ let terrains = genTerrains(abs(toBigInt(txId)), continentIdx)
654+ let freeNum = valueOrElse(getInteger(keyNextFreeLandNum()), 501)
655+ let newLandNum = toString(freeNum)
656+ let issue = Issue(keyNftName(newLandNum, newLandSize), makeString([newLandNum, newLandSize, terrains, r._3], "_"), 1, 0, false)
657+ let assetId = calculateAssetId(issue)
658+ let newLandAssetId = toBase58String(assetId)
659+ let newMat = makeString(subtractMaterials((needMat > 0), split(currentPack[bpIdxMat], "_"), needMat), "_")
660+ $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)) :+ ScriptTransfer(addressFromStringValue(addr), 1, assetId)), newLandAssetId)
661+ }
662+
663+
664+func s2m (addr,landAssetIds,txId) = mergeInternal("M", 3, "SSSS", addr, landAssetIds, txId, 0)
665+
666+
667+func m2l (addr,landAssetIds,txId,shouldUseMat,paymentAmount) = {
668+ let cost = (InfraUpgradeCostSUsdn * 4)
669+ if (if (!(shouldUseMat))
670+ then (paymentAmount != cost)
671+ else false)
672+ then throw(("Payment attached should be " + toString(cost)))
673+ else mergeInternal("L", 4, "SMM", addr, landAssetIds, txId, (InfraUpgradeCostS * 4))
674+ }
675+
676+
677+func l2xl (addr,landAssetIds,txId,shouldUseMat,paymentAmount) = {
678+ let cost = (InfraUpgradeCostSUsdn * 47)
679+ if (if (!(shouldUseMat))
680+ then (paymentAmount != cost)
681+ else false)
682+ then throw(("Payment attached should be " + toString(cost)))
683+ else mergeInternal("XL", 5, "SSSML", addr, landAssetIds, txId, (InfraUpgradeCostS * 47))
684+ }
685+
686+
687+func xl2xxl (addr,landAssetIds,txId,shouldUseMat,paymentAmount) = {
688+ let cost = (InfraUpgradeCostSUsdn * 54)
689+ if (if (!(shouldUseMat))
690+ then (paymentAmount != cost)
691+ else false)
692+ then throw(("Payment attached should be " + toString(cost)))
693+ else mergeInternal("XXL", 6, "LXL", addr, landAssetIds, txId, (InfraUpgradeCostS * 54))
694+ }
695+
696+
697+func mergeCommon (shouldUseMat,addr,paymentAmount,landAssetIds,txId) = {
698+ let mergeResult = match size(landAssetIds) {
699+ case _ =>
700+ if ((4 == $match0))
701+ then s2m(addr, landAssetIds, txId)
702+ else if ((3 == $match0))
703+ then m2l(addr, landAssetIds, txId, shouldUseMat, paymentAmount)
704+ else if ((5 == $match0))
705+ then l2xl(addr, landAssetIds, txId, shouldUseMat, paymentAmount)
706+ else if ((2 == $match0))
707+ then xl2xxl(addr, landAssetIds, txId, shouldUseMat, paymentAmount)
708+ else throw("Unknown merge")
709+ }
710+ mergeResult
557711 }
558712
559713
788942 then throw("Allowed USDN payment only!")
789943 else if ((pmt.amount != EXPUSDN))
790944 then throw(("Payment attached should be " + toString(EXPUSDN)))
791- else expeditionCommon(false, i.caller, i.transactionId, message, sig)
945+ else {
946+ let result = expeditionCommon(false, i.caller, i.transactionId, message, sig)
947+ $Tuple2((result._1 :+ ScriptTransfer(economyAddr, pmt.amount, usdnAssetId)), result._2)
948+ }
792949 }
793950
794951
814971 let pmt = value(i.payments[0])
815972 if ((pmt.assetId != usdnAssetId))
816973 then throw("Allowed USDN payment only!")
817- else upInfraCommon(false, i.caller, pmt.amount)
974+ else {
975+ let result = upInfraCommon(false, i.caller, pmt.amount)
976+ $Tuple2((result._1 :+ ScriptTransfer(economyAddr, pmt.amount, usdnAssetId)), result._2)
977+ }
818978 }
819979
820980
833993 }
834994
835995
996+
997+@Callable(i)
998+func mergeLands (landAssetIds) = if ((size(i.payments) != 0))
999+ then throw("Lands merging doesn't require any payments")
1000+ else mergeCommon(true, toString(i.caller), 0, landAssetIds, i.transactionId)
1001+
1002+
1003+
1004+@Callable(i)
1005+func mergeLandsUsdn (landAssetIds) = if ((size(i.payments) != 1))
1006+ then throw("Exactly one payment required")
1007+ else {
1008+ let pmt = value(i.payments[0])
1009+ if ((pmt.assetId != usdnAssetId))
1010+ then throw("Allowed USDN payment only!")
1011+ else {
1012+ let result = mergeCommon(false, toString(i.caller), pmt.amount, landAssetIds, i.transactionId)
1013+ $Tuple2((result._1 :+ ScriptTransfer(economyAddr, pmt.amount, usdnAssetId)), result._2)
1014+ }
1015+ }
1016+
1017+
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let chain = toUtf8String(take(drop(this.bytes, 1), 1))
55
66 let usdnAssetId = match chain {
77 case _ =>
88 if (("W" == $match0))
99 then base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'
1010 else if (("T" == $match0))
1111 then base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ'
1212 else throw("Unknown chain")
1313 }
1414
1515 let incubatorAddr = match chain {
1616 case _ =>
1717 if (("W" == $match0))
1818 then addressFromStringValue("3PEktVux2RhchSN63DsDo4b4mz4QqzKSeDv")
1919 else if (("T" == $match0))
2020 then this
2121 else throw("Unknown chain")
2222 }
2323
2424 let breederAddr = match chain {
2525 case _ =>
2626 if (("W" == $match0))
2727 then addressFromStringValue("3PDVuU45H7Eh5dmtNbnRNRStGwULA7NY6Hb")
2828 else if (("T" == $match0))
2929 then this
3030 else throw("Unknown chain")
3131 }
3232
3333 let economyAddr = match chain {
3434 case _ =>
3535 if (("W" == $match0))
3636 then addressFromStringValue("3P2sk1KncSxRaZs8b4CWGPw2jkvvav74u4D")
3737 else if (("T" == $match0))
3838 then addressFromStringValue("3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep")
3939 else throw("Unknown chain")
4040 }
4141
4242 let pub = base58'6LfPuKJjLgekmncBhMg2LZyMTNVzZBccXR28ySXm9uXD'
4343
4444 let HEALCOST = 10000
4545
4646 let LANDPREFIX = "LAND"
4747
4848 let DUCKPREFIX = "DUCK"
4949
5050 let DEFAULTLOCATION = "Africa_F_Africa"
5151
5252 let NUMRES = 6
5353
5454 let DAILYRESBYPIECE = 3456000
5555
5656 let DAYMILLIS = 86400000
5757
5858 let FIVEMINUTESMILLIS = 300000
5959
6060 let RESOURCEPRICEMIN = 158549
6161
6262 let InfraUpgradeCostS = match chain {
6363 case _ =>
6464 if (("W" == $match0))
6565 then 18921595217
6666 else if (("T" == $match0))
6767 then 189215952
6868 else throw("Unknown chain")
6969 }
7070
7171 let InfraUpgradeCostSUsdn = match chain {
7272 case _ =>
7373 if (("W" == $match0))
7474 then 120000000
7575 else if (("T" == $match0))
7676 then 1200000
7777 else throw("Unknown chain")
7878 }
7979
8080 let EXPMATERIALS = match chain {
8181 case _ =>
8282 if (("W" == $match0))
8383 then 157679960139
8484 else if (("T" == $match0))
8585 then 1576799601
8686 else throw("Unknown chain")
8787 }
8888
8989 let EXPUSDN = match chain {
9090 case _ =>
9191 if (("W" == $match0))
9292 then 1000000000
9393 else if (("T" == $match0))
9494 then 10000000
9595 else throw("Unknown chain")
9696 }
9797
9898 let MULT6 = 1000000
9999
100100 let FIVEX = toBigInt(5)
101101
102102 let TWENTYX = toBigInt(20)
103103
104104 let TWENTY2X = toBigInt((20 * 20))
105105
106106 let TWENTY3X = toBigInt(((20 * 20) * 20))
107107
108108 let TWENTY4X = toBigInt((((20 * 20) * 20) * 20))
109109
110110 let TWENTY5X = toBigInt(((((20 * 20) * 20) * 20) * 20))
111111
112112 let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"]
113113
114114 let continents = ["Asia", "Europe", "Americas", "Oceania", "Africa"]
115115
116+let ARTPRESALE = "PRESALE"
117+
116118 func keyNextFreeLandNum () = "nextLandNum"
117119
118120
119121 func keyLandToAssetId (landNum) = ("landToAsset_" + landNum)
120122
121123
122124 func keyNftName (landNum,landSize) = ((LANDPREFIX + landNum) + landSize)
123125
124126
125127 func keyLandAssetIdToOwner (assetId) = ("nftOwner_" + assetId)
126128
127129
128130 func keyDuckIdToOwner (assetId) = ("duckOwner_" + assetId)
129131
130132
131133 func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId)
132134
133135
134136 func keyInfraLevelByAssetId (assetId) = ("infraLevel_" + assetId)
135137
136138
137139 func keyInfraLevelByAssetIdAndOwner (assetId,ownerAddr) = ((("infraLevelByAssetIdAndOwner_" + assetId) + "_") + ownerAddr)
138140
139141
140142 func keyPresaleArtActivatedByAssetId (assetId) = ("presaleArtActivated_" + assetId)
141143
142144
143145 func keyPresaleArtActivatedByAssetIdAndOwner (assetId,ownerAddr) = ((("presaleArtActivatedByAssetIdAndOwner_" + assetId) + "_") + ownerAddr)
146+
147+
148+func keyLandArtStatusByTypeAndAssetId (type,assetId) = makeString(["landArtStatus", type, assetId], "_")
149+
150+
151+func keyLandArtStatusByTypeAssetIdAndOwner (type,assetId,ownerAddr) = makeString(["landArtStatusByTypeAssetIdAndOwner", type, assetId, ownerAddr], "_")
144152
145153
146154 func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr)
147155
148156
149157 func keyStakedTimeByTypeAssetIdAndOwner (nftType,assetId,ownerAddr) = ((((("stakedTimeByTypeAssetIdAndOwner_" + nftType) + "_") + assetId) + "_") + ownerAddr)
150158
151159
152160 func keyLandNumToOwner (landNum) = ("landOwner_" + landNum)
153161
154162
155163 func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId)
156164
157165
158166 func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId)
159167
160168
161169 func keyDuckHealth (duckAssetId) = ("duckHealth_" + duckAssetId)
162170
163171
164172 func keyResProportions () = "resTypesProportions"
165173
166174
167175 let recLandNum = 0
168176
169177 let recLandSize = 1
170178
171179 let recTerrains = 2
172180
173181 let recContinent = 3
174182
175183 let locIdxContinent = 0
176184
177185 let locIdxType = 1
178186
179187 let locIdxId = 2
180188
181189 let bpIdxLevel = 0
182190
183191 let bpIdxRes = 1
184192
185193 let bpIdxMat = 2
186194
187195 let bpIdxProd = 3
188196
189197 func asString (v) = match v {
190198 case s: String =>
191199 s
192200 case _ =>
193201 throw("fail to cast into String")
194202 }
195203
196204
197205 func getNeededMaterials (total) = {
198206 let props = split(value(getString(keyResProportions())), "_")
199207 if ((size(props) != NUMRES))
200208 then throw("Wrong proportions data")
201209 else {
202210 let r = [parseIntValue(props[0]), parseIntValue(props[1]), parseIntValue(props[2]), parseIntValue(props[3]), parseIntValue(props[4]), parseIntValue(props[5])]
203211 let sum = (((((r[0] + r[1]) + r[2]) + r[3]) + r[4]) + r[5])
204212 if ((0 >= sum))
205213 then throw("No lands staked")
206214 else {
207215 let norm6 = fraction(total, MULT6, sum)
208216 func normalizer (acc,elem) = (acc :+ fraction(elem, norm6, MULT6))
209217
210218 let $l = r
211219 let $s = size($l)
212220 let $acc0 = nil
213221 func $f0_1 ($a,$i) = if (($i >= $s))
214222 then $a
215223 else normalizer($a, $l[$i])
216224
217225 func $f0_2 ($a,$i) = if (($i >= $s))
218226 then $a
219227 else throw("List size exceeds 6")
220228
221229 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
222230 }
223231 }
224232 }
225233
226234
227235 func subtractMaterials (shouldUseMat,has,totalNeed) = {
228236 let need = getNeededMaterials(totalNeed)
229237 func subtractor (acc,idx) = {
230238 let result = (parseIntValue(has[idx]) - need[idx])
231239 if ((0 > result))
232240 then throw(((((("Not enough material idx=" + toString(idx)) + ", you have ") + has[idx]) + ", but need ") + toString(need[idx])))
233241 else (acc :+ toString(result))
234242 }
235243
236244 if (shouldUseMat)
237245 then {
238246 let $l = [0, 1, 2, 3, 4, 5]
239247 let $s = size($l)
240248 let $acc0 = nil
241249 func $f0_1 ($a,$i) = if (($i >= $s))
242250 then $a
243251 else subtractor($a, $l[$i])
244252
245253 func $f0_2 ($a,$i) = if (($i >= $s))
246254 then $a
247255 else throw("List size exceeds 6")
248256
249257 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
250258 }
251259 else has
252260 }
253261
254262
263+func updateProportionsInternal (propList,terrainCounts,landSizeIndex,sign) = if ((size(propList) != NUMRES))
264+ then throw("Wrong proportions data")
265+ else {
266+ func updater (acc,i) = {
267+ let result = (parseIntValue(propList[i]) + ((sign * terrainCounts[i]) * landSizeIndex))
268+ if ((0 > result))
269+ then throw(((((((("Panic! Pieces of type=" + toString(i)) + ", sign=") + toString(sign)) + ", terrainCounts[i]=") + toString(terrainCounts[i])) + ", landSizeIndex=") + toString(landSizeIndex)))
270+ else (acc :+ toString(result))
271+ }
272+
273+ let r = {
274+ let $l = [0, 1, 2, 3, 4, 5]
275+ let $s = size($l)
276+ let $acc0 = nil
277+ func $f0_1 ($a,$i) = if (($i >= $s))
278+ then $a
279+ else updater($a, $l[$i])
280+
281+ func $f0_2 ($a,$i) = if (($i >= $s))
282+ then $a
283+ else throw("List size exceeds 6")
284+
285+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
286+ }
287+ makeString(r, "_")
288+ }
289+
290+
255291 func updateProportions (terrainCounts,landSizeIndex,sign) = {
256- let props = split(valueOrElse(getString(keyResProportions()), "0_0_0_0_0_0"), "_")
257- if ((size(props) != NUMRES))
258- then throw("Wrong proportions data")
259- else {
260- func updater (acc,i) = {
261- let result = (parseIntValue(props[i]) + ((sign * terrainCounts[i]) * landSizeIndex))
262- if ((0 > result))
263- then throw(((((((("Panic! Pieces of type=" + toString(i)) + ", sign=") + toString(sign)) + ", terrainCounts[i]=") + toString(terrainCounts[i])) + ", landSizeIndex=") + toString(landSizeIndex)))
264- else (acc :+ toString(result))
265- }
266-
267- let r = {
268- let $l = [0, 1, 2, 3, 4, 5]
269- let $s = size($l)
270- let $acc0 = nil
271- func $f0_1 ($a,$i) = if (($i >= $s))
272- then $a
273- else updater($a, $l[$i])
274-
275- func $f0_2 ($a,$i) = if (($i >= $s))
276- then $a
277- else throw("List size exceeds 6")
278-
279- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
280- }
281- makeString(r, "_")
282- }
292+ let propList = split(valueOrElse(getString(keyResProportions()), "0_0_0_0_0_0"), "_")
293+ updateProportionsInternal(propList, terrainCounts, landSizeIndex, sign)
283294 }
284295
285296
286297 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)]
287298
288299
289300 func numPiecesBySize (landSize) = match landSize {
290301 case _ =>
291302 if (("S" == $match0))
292303 then 25
293304 else if (("M" == $match0))
294305 then 100
295306 else if (("L" == $match0))
296307 then 225
297308 else if (("XL" == $match0))
298309 then 400
299310 else if (("XXL" == $match0))
300311 then 625
301312 else throw("Unknown land size")
302313 }
303314
304315
305316 func subOneInList (aList,idx,amount) = {
306317 func subber (acc,i) = (acc :+ (if ((i == idx))
307318 then toString((parseIntValue(aList[i]) - amount))
308319 else aList[i]))
309320
310321 let r = {
311322 let $l = [0, 1, 2, 3, 4, 5]
312323 let $s = size($l)
313324 let $acc0 = nil
314325 func $f0_1 ($a,$i) = if (($i >= $s))
315326 then $a
316327 else subber($a, $l[$i])
317328
318329 func $f0_2 ($a,$i) = if (($i >= $s))
319330 then $a
320331 else throw("List size exceeds 6")
321332
322333 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
323334 }
324335 makeString(r, "_")
325336 }
326337
327338
328339 func addRes (currentRes,terrainCounts,deltaTime,landSizeIndex,dailyByPieceWithBonuses) = {
329340 func adder (acc,i) = {
330341 let resOfType = ((fraction(deltaTime, dailyByPieceWithBonuses, DAYMILLIS) * terrainCounts[i]) * landSizeIndex)
331342 (acc :+ toString((parseIntValue(currentRes[i]) + resOfType)))
332343 }
333344
334345 let r = {
335346 let $l = [0, 1, 2, 3, 4, 5]
336347 let $s = size($l)
337348 let $acc0 = nil
338349 func $f0_1 ($a,$i) = if (($i >= $s))
339350 then $a
340351 else adder($a, $l[$i])
341352
342353 func $f0_2 ($a,$i) = if (($i >= $s))
343354 then $a
344355 else throw("List size exceeds 6")
345356
346357 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
347358 }
348359 makeString(r, "_")
349360 }
350361
351362
352363 func abs (x) = if ((x >= toBigInt(0)))
353364 then x
354365 else -(x)
355366
356367
357368 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]]
358369
359370 func genChar (n,freqs) = {
360371 let rem = toInt((n % TWENTYX))
361372 let letter = if ((freqs[0] > rem))
362373 then "A"
363374 else if ((freqs[1] > rem))
364375 then "B"
365376 else if ((freqs[2] > rem))
366377 then "C"
367378 else if ((freqs[3] > rem))
368379 then "D"
369380 else if ((freqs[4] > rem))
370381 then "E"
371382 else "F"
372383 letter
373384 }
374385
375386
387+func genTerrains (seed,continentIdx) = {
388+ let f = freq[continentIdx]
389+ 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+
391+ let t = {
392+ let $l = [1, 2, 3, 4, 5]
393+ let $s = size($l)
394+ let $acc0 = $Tuple2("", (seed / FIVEX))
395+ func $f0_1 ($a,$i) = if (($i >= $s))
396+ then $a
397+ else terrainGenerator($a, $l[$i])
398+
399+ func $f0_2 ($a,$i) = if (($i >= $s))
400+ then $a
401+ else throw("List size exceeds 5")
402+
403+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
404+ }
405+ t._1
406+ }
407+
408+
376409 func getBackpack (bpKey) = {
377410 let p = split(valueOrElse(getString(bpKey), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":")
378411 [toString(valueOrElse(parseInt(p[bpIdxLevel]), 0)), if ((size(split(p[bpIdxRes], "_")) == NUMRES))
379412 then p[bpIdxRes]
380413 else "0_0_0_0_0_0", if ((size(split(p[bpIdxMat], "_")) == NUMRES))
381414 then p[bpIdxMat]
382415 else "0_0_0_0_0_0", p[bpIdxProd]]
383416 }
384417
385418
386419 func expeditionCommon (shouldUseMat,caller,txId,message,sig) = if (!(sigVerify_8Kb(message, sig, pub)))
387420 then throw("signature does not match")
388421 else {
389422 let parts = split(toUtf8String(message), ";")
390423 let hp = split(split(parts[0], "|")[0], "_")
391424 let curHP = parseIntValue(hp[0])
392425 let newHP = parseIntValue(hp[1])
393426 let locAndTime = split(parts[1], ":")
394427 let targetLocation = split(locAndTime[0], "_")
395428 if ((targetLocation[1] != "E"))
396429 then throw("expedition target location type should be E")
397430 else {
398431 let time = parseIntValue(locAndTime[1])
399432 if (if ((time > (lastBlock.timestamp + FIVEMINUTESMILLIS)))
400433 then true
401434 else ((lastBlock.timestamp - FIVEMINUTESMILLIS) > time))
402435 then throw("signature outdated")
403436 else {
404437 let userAddr = toString(caller)
405438 let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(userAddr)), "You don't have a duck staked")
406439 let keyHealth = keyDuckHealth(duckAssetId)
407440 let oldFromState = valueOrElse(getInteger(keyHealth), 100)
408441 if ((oldFromState != curHP))
409442 then throw(((("oldHealth=" + toString(valueOrElse(getInteger(keyHealth), 100))) + " from state does not match one from flight log=") + toString(curHP)))
410443 else if ((0 >= curHP))
411444 then throw("You can't fly with zero health")
412445 else if ((0 >= newHP))
413446 then $Tuple2(((if (!(shouldUseMat))
414447 then [ScriptTransfer(caller, EXPUSDN, usdnAssetId)]
415448 else nil) :+ IntegerEntry(keyHealth, 0)), "")
416449 else {
417450 let bpKey = keyBackpackByDuck(duckAssetId)
418451 let currentPack = getBackpack(bpKey)
419452 let mList = split(currentPack[bpIdxMat], "_")
420453 let newMat = makeString(subtractMaterials(shouldUseMat, mList, EXPMATERIALS), "_")
421454 let bigNum = abs(toBigInt(txId))
422455 let freeNum = valueOrElse(getInteger(keyNextFreeLandNum()), 501)
423456 let landNum = toString(freeNum)
424457 let continentIdx = toInt((bigNum % FIVEX))
425- let f = freq[continentIdx]
426- 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))
427-
428- let t = {
429- let $l = [1, 2, 3, 4, 5]
430- let $s = size($l)
431- let $acc0 = $Tuple2("", (bigNum / FIVEX))
432- func $f0_1 ($a,$i) = if (($i >= $s))
433- then $a
434- else terrainGenerator($a, $l[$i])
435-
436- func $f0_2 ($a,$i) = if (($i >= $s))
437- then $a
438- else throw("List size exceeds 5")
439-
440- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
441- }
458+ let terrains = genTerrains(bigNum, continentIdx)
442459 let continent = continents[continentIdx]
443- let issue = Issue(keyNftName(landNum, "S"), makeString([landNum, "S", t._1, continent], "_"), 1, 0, false)
460+ let issue = Issue(keyNftName(landNum, "S"), makeString([landNum, "S", terrains, continent], "_"), 1, 0, false)
444461 let assetId = calculateAssetId(issue)
445462 let id = toBase58String(assetId)
446463 $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)
447464 }
448465 }
449466 }
450467 }
451468
452469
453-func applyBonuses (landAssetId) = {
470+func applyBonuses (landAssetId,pieces) = {
454471 let infraLevel = valueOrElse(getInteger(keyInfraLevelByAssetId(landAssetId)), 0)
455- let presaleBonus = if (valueOrElse(getBoolean(keyPresaleArtActivatedByAssetId(landAssetId)), false))
456- then 3
457- else 0
458- ((DAILYRESBYPIECE + fraction(DAILYRESBYPIECE, infraLevel, 4)) + fraction(DAILYRESBYPIECE, presaleBonus, 20))
472+ let artPieces = valueOrElse(getInteger(keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId)), if (valueOrElse(getBoolean(keyPresaleArtActivatedByAssetId(landAssetId)), false))
473+ then pieces
474+ else 0)
475+ ((DAILYRESBYPIECE + fraction(DAILYRESBYPIECE, infraLevel, 4)) + fraction(DAILYRESBYPIECE, (artPieces * 3), (pieces * 20)))
459476 }
460477
461478
462479 func checkClaimConditions (addr) = {
463480 let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(addr)), "You don't have a duck staked")
464481 let curLocation = valueOrElse(getString(keyDuckLocation(duckAssetId)), DEFAULTLOCATION)
465482 let loc = split(value(curLocation), "_")
466483 if ((loc[locIdxType] != "L"))
467484 then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L"))
468485 else {
469486 let landAssetId = loc[locIdxId]
470487 let asset = value(assetInfo(fromBase58String(landAssetId)))
471488 let timeKey = keyStakedTimeByAssetId(landAssetId)
472489 let savedTime = valueOrErrorMessage(getInteger(timeKey), (("NFT " + asset.name) + " is not staked"))
473490 let owner = valueOrErrorMessage(getString(keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
474491 if ((owner != addr))
475492 then throw((LANDPREFIX + " is not yours"))
476493 else {
477494 let d = split(asset.description, "_")
478495 $Tuple4(duckAssetId, landAssetId, d, savedTime)
479496 }
480497 }
481498 }
482499
483500
484501 func claimResInternal (addr,amount) = {
485502 let c = checkClaimConditions(addr)
486503 let landSize = c._3[recLandSize]
487504 let terrainCounts = countTerrains(c._3[recTerrains])
488505 let deltaTime = (lastBlock.timestamp - c._4)
489506 if ((0 > deltaTime))
490507 then throw(((("Saved timestamp is in future, saved = " + toString(c._4)) + ", current = ") + toString(lastBlock.timestamp)))
491508 else {
492509 let pieces = numPiecesBySize(landSize)
493- let dailyProductionByPiece = applyBonuses(c._2)
510+ let dailyProductionByPiece = applyBonuses(c._2, pieces)
494511 let availRes = fraction(deltaTime, (dailyProductionByPiece * pieces), DAYMILLIS)
495512 if ((amount > availRes))
496513 then throw(((("Not enough resources, available = " + toString(availRes)) + ", requested = ") + toString(amount)))
497514 else {
498515 let newDeltaTime = fraction((availRes - amount), DAYMILLIS, (dailyProductionByPiece * pieces))
499516 let newTimestamp = (lastBlock.timestamp - newDeltaTime)
500517 let bpKey = keyBackpackByDuck(c._1)
501518 let currentPack = getBackpack(bpKey)
502519 let currentRes = split(currentPack[bpIdxRes], "_")
503520 let bpRes = addRes(currentRes, terrainCounts, (deltaTime - newDeltaTime), (pieces / 25), dailyProductionByPiece)
504521 $Tuple3([IntegerEntry(keyStakedTimeByAssetId(c._2), newTimestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, c._2, addr), newTimestamp)], bpKey, [currentPack[bpIdxLevel], bpRes, currentPack[bpIdxMat], currentPack[bpIdxProd]])
505522 }
506523 }
507524 }
508525
509526
510527 func claimAll (addr,landAssetId,pieces) = {
511528 let timeKey = keyStakedTimeByAssetId(landAssetId)
512529 let savedTime = value(getInteger(timeKey))
513- let availRes = (fraction((lastBlock.timestamp - savedTime), applyBonuses(landAssetId), DAYMILLIS) * pieces)
530+ let availRes = (fraction((lastBlock.timestamp - savedTime), applyBonuses(landAssetId, pieces), DAYMILLIS) * pieces)
514531 claimResInternal(addr, availRes)
515532 }
516533
517534
518535 func upInfraCommon (shouldUseMat,caller,paymentAmount) = {
519536 let addr = toString(caller)
520537 let c = checkClaimConditions(addr)
521538 let pieces = numPiecesBySize(c._3[recLandSize])
522539 let infraKey = keyInfraLevelByAssetId(c._2)
523540 let curLevel = valueOrElse(getInteger(infraKey), 0)
524541 if ((curLevel >= 3))
525542 then throw("Currently max infrastructure level = 3")
526543 else {
527544 let newLevel = (curLevel + 1)
528545 let cost = fraction(InfraUpgradeCostSUsdn, (pieces * newLevel), 25)
529546 if (if (!(shouldUseMat))
530547 then (paymentAmount != cost)
531548 else false)
532549 then throw(("Payment attached should be " + toString(cost)))
533550 else {
534551 let bpKey = keyBackpackByDuck(c._1)
535552 let currentPack = getBackpack(bpKey)
536553 let mList = split(currentPack[bpIdxMat], "_")
537554 let newMat = makeString(subtractMaterials(shouldUseMat, mList, fraction(InfraUpgradeCostS, (pieces * newLevel), 25)), "_")
538555 let claimResult = claimAll(addr, c._2, pieces)
539556 $Tuple2(([IntegerEntry(infraKey, newLevel), IntegerEntry(keyInfraLevelByAssetIdAndOwner(c._2, addr), newLevel), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], claimResult._3[bpIdxRes], newMat, currentPack[bpIdxProd]], ":"))] ++ claimResult._1), newLevel)
540557 }
541558 }
542559 }
543560
544561
545562 func activatePresaleArt (addr) = {
546563 let c = checkClaimConditions(addr)
547- let activationKey = keyPresaleArtActivatedByAssetId(c._2)
564+ let landAssetId = c._2
565+ let activationKey = keyPresaleArtActivatedByAssetId(landAssetId)
548566 if (valueOrElse(getBoolean(activationKey), false))
549567 then throw("Presale artifact is already activated")
550568 else if ((parseIntValue(c._3[recLandNum]) > 500))
551- then throw((((LANDPREFIX + " ") + c._2) + " is not eligible for presale artifact"))
569+ then throw((((LANDPREFIX + " ") + landAssetId) + " is not eligible for presale artifact"))
552570 else {
553571 let pieces = numPiecesBySize(c._3[recLandSize])
554- let claimResult = claimAll(addr, c._2, pieces)
555- (((claimResult._1 :+ BooleanEntry(keyPresaleArtActivatedByAssetId(c._2), true)) :+ BooleanEntry(keyPresaleArtActivatedByAssetIdAndOwner(c._2, addr), true)) :+ StringEntry(claimResult._2, makeString(claimResult._3, ":")))
572+ let claimResult = claimAll(addr, landAssetId, pieces)
573+ (((((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, ":")))
556574 }
575+ }
576+
577+
578+func mergeInternal (newLandSize,newLevel,formula,addr,landAssetIds,txId,needMat) = {
579+ let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(addr)), "You don't have a duck staked")
580+ func checkMerge (acc,landAssetId) = {
581+ let asset = value(assetInfo(fromBase58String(landAssetId)))
582+ let timeKey = keyStakedTimeByAssetId(landAssetId)
583+ let savedTime = valueOrErrorMessage(getInteger(timeKey), (("NFT " + asset.name) + " is not staked"))
584+ let owner = valueOrErrorMessage(getString(keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
585+ if ((owner != addr))
586+ then throw((LANDPREFIX + " is not yours"))
587+ else {
588+ let d = split(asset.description, "_")
589+ let continent = d[recContinent]
590+ if (if ((acc._3 != ""))
591+ then (acc._3 != continent)
592+ else false)
593+ then throw("Lands should be on the same continent to merge")
594+ else {
595+ let landSize = d[recLandSize]
596+ let sizesIn = acc._1
597+ let i = valueOrErrorMessage(indexOf(sizesIn, landSize), "You haven't passed all the lands needed")
598+ let sizesOut = (take(sizesIn, i) + drop(sizesIn, (i + 1)))
599+ let pieces = numPiecesBySize(landSize)
600+ let arts = (acc._2 + valueOrElse(getInteger(keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId)), if (valueOrElse(getBoolean(keyPresaleArtActivatedByAssetId(landAssetId)), false))
601+ then pieces
602+ else 0))
603+ let infraLevel = valueOrElse(getInteger(keyInfraLevelByAssetId(landAssetId)), 0)
604+ let reqLevel = match landSize {
605+ case _ =>
606+ if (("S" == $match0))
607+ then 3
608+ else if (("M" == $match0))
609+ then 4
610+ else if (("L" == $match0))
611+ then 5
612+ else if (("XL" == $match0))
613+ then 6
614+ else throw("Only S, M, L, XL can merge")
615+ }
616+ if ((infraLevel != reqLevel))
617+ then throw("All lands should be maxed to merge")
618+ else {
619+ let landNum = d[recLandNum]
620+ let terrainCounts = countTerrains(d[recTerrains])
621+ let deltaTime = (lastBlock.timestamp - savedTime)
622+ if ((0 > deltaTime))
623+ then throw(((("Saved timestamp is in future, saved = " + toString(savedTime)) + ", current = ") + toString(lastBlock.timestamp)))
624+ else {
625+ let dailyProductionByPiece = applyBonuses(landAssetId, pieces)
626+ let bpRes = addRes(split(acc._4, "_"), terrainCounts, deltaTime, (pieces / 25), dailyProductionByPiece)
627+ let props = updateProportionsInternal(split(acc._6, "_"), terrainCounts, (pieces / 25), -1)
628+ $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+ }
630+ }
631+ }
632+ }
633+ }
634+
635+ let bpKey = keyBackpackByDuck(duckAssetId)
636+ let currentPack = getBackpack(bpKey)
637+ let propStr = valueOrElse(getString(keyResProportions()), "0_0_0_0_0_0")
638+ let r = {
639+ let $l = landAssetIds
640+ let $s = size($l)
641+ let $acc0 = $Tuple6(formula, 0, "", currentPack[bpIdxRes], nil, propStr)
642+ func $f0_1 ($a,$i) = if (($i >= $s))
643+ then $a
644+ else checkMerge($a, $l[$i])
645+
646+ func $f0_2 ($a,$i) = if (($i >= $s))
647+ then $a
648+ else throw("List size exceeds 4")
649+
650+ $f0_2($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4)
651+ }
652+ let continentIdx = valueOrErrorMessage(indexOf(continents, r._3), ("Unknown continent: " + r._3))
653+ let terrains = genTerrains(abs(toBigInt(txId)), continentIdx)
654+ let freeNum = valueOrElse(getInteger(keyNextFreeLandNum()), 501)
655+ let newLandNum = toString(freeNum)
656+ let issue = Issue(keyNftName(newLandNum, newLandSize), makeString([newLandNum, newLandSize, terrains, r._3], "_"), 1, 0, false)
657+ let assetId = calculateAssetId(issue)
658+ let newLandAssetId = toBase58String(assetId)
659+ let newMat = makeString(subtractMaterials((needMat > 0), split(currentPack[bpIdxMat], "_"), needMat), "_")
660+ $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)) :+ ScriptTransfer(addressFromStringValue(addr), 1, assetId)), newLandAssetId)
661+ }
662+
663+
664+func s2m (addr,landAssetIds,txId) = mergeInternal("M", 3, "SSSS", addr, landAssetIds, txId, 0)
665+
666+
667+func m2l (addr,landAssetIds,txId,shouldUseMat,paymentAmount) = {
668+ let cost = (InfraUpgradeCostSUsdn * 4)
669+ if (if (!(shouldUseMat))
670+ then (paymentAmount != cost)
671+ else false)
672+ then throw(("Payment attached should be " + toString(cost)))
673+ else mergeInternal("L", 4, "SMM", addr, landAssetIds, txId, (InfraUpgradeCostS * 4))
674+ }
675+
676+
677+func l2xl (addr,landAssetIds,txId,shouldUseMat,paymentAmount) = {
678+ let cost = (InfraUpgradeCostSUsdn * 47)
679+ if (if (!(shouldUseMat))
680+ then (paymentAmount != cost)
681+ else false)
682+ then throw(("Payment attached should be " + toString(cost)))
683+ else mergeInternal("XL", 5, "SSSML", addr, landAssetIds, txId, (InfraUpgradeCostS * 47))
684+ }
685+
686+
687+func xl2xxl (addr,landAssetIds,txId,shouldUseMat,paymentAmount) = {
688+ let cost = (InfraUpgradeCostSUsdn * 54)
689+ if (if (!(shouldUseMat))
690+ then (paymentAmount != cost)
691+ else false)
692+ then throw(("Payment attached should be " + toString(cost)))
693+ else mergeInternal("XXL", 6, "LXL", addr, landAssetIds, txId, (InfraUpgradeCostS * 54))
694+ }
695+
696+
697+func mergeCommon (shouldUseMat,addr,paymentAmount,landAssetIds,txId) = {
698+ let mergeResult = match size(landAssetIds) {
699+ case _ =>
700+ if ((4 == $match0))
701+ then s2m(addr, landAssetIds, txId)
702+ else if ((3 == $match0))
703+ then m2l(addr, landAssetIds, txId, shouldUseMat, paymentAmount)
704+ else if ((5 == $match0))
705+ then l2xl(addr, landAssetIds, txId, shouldUseMat, paymentAmount)
706+ else if ((2 == $match0))
707+ then xl2xxl(addr, landAssetIds, txId, shouldUseMat, paymentAmount)
708+ else throw("Unknown merge")
709+ }
710+ mergeResult
557711 }
558712
559713
560714 @Callable(i)
561715 func stakeLand () = {
562716 let pmt = value(i.payments[0])
563717 let assetId = value(pmt.assetId)
564718 let address = toString(i.caller)
565719 if ((pmt.amount != 1))
566720 then throw((("NFT " + LANDPREFIX) + " token should be attached as payment"))
567721 else {
568722 let asset = value(assetInfo(assetId))
569723 if ((asset.issuer != this))
570724 then throw("Unknown issuer of token")
571725 else if (!(contains(asset.name, LANDPREFIX)))
572726 then throw((("Only NFT " + LANDPREFIX) + " tokens are accepted"))
573727 else {
574728 let landNumSize = drop(asset.name, 4)
575729 let landNum = if (contains(landNumSize, "XXL"))
576730 then dropRight(landNumSize, 3)
577731 else if (contains(landNumSize, "XL"))
578732 then dropRight(landNumSize, 2)
579733 else dropRight(landNumSize, 1)
580734 let landNumInt = valueOrErrorMessage(parseInt(landNum), ("Cannot parse land number from " + asset.name))
581735 let landAssetId = toBase58String(assetId)
582736 let timeKey = keyStakedTimeByAssetId(landAssetId)
583737 if (isDefined(getInteger(timeKey)))
584738 then throw((("NFT " + asset.name) + " is already staked"))
585739 else {
586740 let d = split(asset.description, "_")
587741 let terrainCounts = countTerrains(d[recTerrains])
588742 let props = updateProportions(terrainCounts, (numPiecesBySize(d[recLandSize]) / 25), 1)
589743 [IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, address), lastBlock.timestamp), StringEntry(keyLandAssetIdToOwner(landAssetId), address), StringEntry(keyLandNumToOwner(landNum), address), StringEntry(keyResProportions(), props)]
590744 }
591745 }
592746 }
593747 }
594748
595749
596750
597751 @Callable(i)
598752 func unstakeLand (landAssetIdStr) = if ((size(i.payments) != 0))
599753 then throw("unstake doesn't require any payments")
600754 else {
601755 let addr = toString(i.caller)
602756 let c = checkClaimConditions(addr)
603757 let terrainCounts = countTerrains(c._3[recTerrains])
604758 let pieces = numPiecesBySize(c._3[recLandSize])
605759 let props = updateProportions(terrainCounts, (pieces / 25), -1)
606760 let claimResult = claimAll(addr, c._2, pieces)
607761 [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, ":"))]
608762 }
609763
610764
611765
612766 @Callable(i)
613767 func stakeDuck () = {
614768 let pmt = value(i.payments[0])
615769 let assetId = value(pmt.assetId)
616770 let address = toString(i.caller)
617771 if ((pmt.amount != 1))
618772 then throw((("NFT " + DUCKPREFIX) + " token should be attached as payment"))
619773 else {
620774 let asset = value(assetInfo(assetId))
621775 if (if ((asset.issuer != incubatorAddr))
622776 then (asset.issuer != breederAddr)
623777 else false)
624778 then throw((("Unknown issuer of " + DUCKPREFIX) + " token"))
625779 else if (!(contains(asset.name, DUCKPREFIX)))
626780 then throw((("Only NFT " + DUCKPREFIX) + " tokens are accepted"))
627781 else {
628782 let assetIdStr = toBase58String(assetId)
629783 let timeKey = keyStakedTimeByAssetId(assetIdStr)
630784 if (isDefined(getInteger(timeKey)))
631785 then throw((("NFT " + asset.name) + " is already staked"))
632786 else if (isDefined(getString(keyStakedDuckByOwner(address))))
633787 then throw(("You already staked one duck: " + asset.name))
634788 else {
635789 let locKey = keyDuckLocation(assetIdStr)
636790 let location = getString(locKey)
637791 let keyHealth = keyDuckHealth(assetIdStr)
638792 let health = getInteger(keyHealth)
639793 let bpKey = keyBackpackByDuck(assetIdStr)
640794 let backpack = getString(bpKey)
641795 ([IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry(keyDuckIdToOwner(assetIdStr), address), StringEntry(keyStakedDuckByOwner(address), assetIdStr)] ++ (if (isDefined(location))
642796 then nil
643797 else ([StringEntry(locKey, DEFAULTLOCATION)] ++ (if (isDefined(health))
644798 then nil
645799 else ([IntegerEntry(keyHealth, 100)] ++ (if (isDefined(backpack))
646800 then nil
647801 else [StringEntry(bpKey, "0:0_0_0_0_0_0:0_0_0_0_0_0:")]))))))
648802 }
649803 }
650804 }
651805 }
652806
653807
654808
655809 @Callable(i)
656810 func unstakeDuck (assetIdStr) = if ((size(i.payments) != 0))
657811 then throw("unstake doesn't require any payments")
658812 else {
659813 let assetId = fromBase58String(assetIdStr)
660814 let address = toString(i.caller)
661815 let asset = value(assetInfo(assetId))
662816 if (if ((asset.issuer != incubatorAddr))
663817 then (asset.issuer != breederAddr)
664818 else false)
665819 then throw((("Unknown issuer of " + DUCKPREFIX) + " token"))
666820 else if (!(contains(asset.name, DUCKPREFIX)))
667821 then throw((("Only NFT " + DUCKPREFIX) + " tokens can be unstaked"))
668822 else {
669823 let timeKey = keyStakedTimeByAssetId(toBase58String(assetId))
670824 if (!(isDefined(timeKey)))
671825 then throw((("NFT " + asset.name) + " is not staked"))
672826 else if (!(isDefined(keyStakedDuckByOwner(address))))
673827 then throw((("The duck " + asset.name) + " is not staked"))
674828 else {
675829 let owner = valueOrErrorMessage(getString(keyDuckIdToOwner(toBase58String(assetId))), (("NFT " + asset.name) + " is orphaned"))
676830 if ((owner != address))
677831 then throw("Staked NFT is not yours")
678832 else [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(timeKey), DeleteEntry(keyDuckLocation(assetIdStr)), DeleteEntry(keyDuckIdToOwner(assetIdStr)), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, assetIdStr, address)), DeleteEntry(keyStakedDuckByOwner(address))]
679833 }
680834 }
681835 }
682836
683837
684838
685839 @Callable(i)
686840 func claimRes (amount,landAssetIdStr) = if ((size(i.payments) != 0))
687841 then throw("claimRes doesn't require any payments")
688842 else {
689843 let addr = toString(i.originCaller)
690844 let result = claimResInternal(addr, amount)
691845 $Tuple2((result._1 :+ StringEntry(result._2, makeString(result._3, ":"))), result._3[bpIdxRes])
692846 }
693847
694848
695849
696850 @Callable(i)
697851 func flight (message,sig) = if (!(sigVerify_8Kb(message, sig, pub)))
698852 then throw("signature does not match")
699853 else if ((size(i.payments) != 0))
700854 then throw("flight doesn't require any payments")
701855 else {
702856 let parts = split(toUtf8String(message), ";")
703857 let hp = split(split(parts[0], "|")[0], "_")
704858 let curHP = parseIntValue(hp[0])
705859 let newHP = parseIntValue(hp[1])
706860 let newLocAndTime = split(parts[1], ":")
707861 let newLocation = newLocAndTime[0]
708862 let time = parseIntValue(newLocAndTime[1])
709863 if (if ((time > (lastBlock.timestamp + FIVEMINUTESMILLIS)))
710864 then true
711865 else ((lastBlock.timestamp - FIVEMINUTESMILLIS) > time))
712866 then throw("signature outdated")
713867 else {
714868 let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
715869 let keyHealth = keyDuckHealth(duckAssetId)
716870 let oldFromState = valueOrElse(getInteger(keyHealth), 100)
717871 if ((oldFromState != curHP))
718872 then throw(((("oldHealth=" + toString(valueOrElse(getInteger(keyHealth), 100))) + " from state does not match one from flight log=") + toString(curHP)))
719873 else if ((0 >= curHP))
720874 then throw("You can't fly with zero health")
721875 else {
722876 let locKey = keyDuckLocation(duckAssetId)
723877 let curLocation = valueOrElse(getString(locKey), DEFAULTLOCATION)
724878 if ((newLocation == curLocation))
725879 then throw("You can't fly to the same location")
726880 else $Tuple2([StringEntry(locKey, if ((newHP > 0))
727881 then newLocation
728882 else curLocation), IntegerEntry(keyHealth, newHP)], unit)
729883 }
730884 }
731885 }
732886
733887
734888
735889 @Callable(i)
736890 func setHealth (health,duckAssetId) = if (if ((0 > health))
737891 then true
738892 else (health > 100))
739893 then throw("HP should be within 0..100")
740894 else [IntegerEntry(keyDuckHealth(duckAssetId), health)]
741895
742896
743897
744898 @Callable(i)
745899 func heal (matType,amount) = if (if ((0 > matType))
746900 then true
747901 else (matType >= NUMRES))
748902 then throw(("Unknown material: " + toString(matType)))
749903 else if ((0 >= amount))
750904 then throw(("Amount should be positive! " + toString(amount)))
751905 else {
752906 let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
753907 let keyHealth = keyDuckHealth(duckAssetId)
754908 let oldHealth = valueOrElse(getInteger(keyHealth), 100)
755909 if ((oldHealth >= 100))
756910 then throw("HP should be < 100 to heal")
757911 else {
758912 let bpKey = keyBackpackByDuck(duckAssetId)
759913 let currentPack = getBackpack(bpKey)
760914 let mList = split(currentPack[bpIdxMat], "_")
761915 let currentAmount = parseIntValue(mList[matType])
762916 let deltaHealth = min([(amount / HEALCOST), (100 - oldHealth)])
763917 let spendAmount = (deltaHealth * HEALCOST)
764918 if ((spendAmount > currentAmount))
765919 then throw(((((("You need " + toString(spendAmount)) + " of ") + matTypes[matType]) + " to heal, but you backpack contains ") + toString(currentAmount)))
766920 else {
767921 let newMat = subOneInList(mList, matType, spendAmount)
768922 [IntegerEntry(keyHealth, (oldHealth + deltaHealth)), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], newMat, currentPack[bpIdxProd]], ":"))]
769923 }
770924 }
771925 }
772926
773927
774928
775929 @Callable(i)
776930 func updateBackpack (duckAssetId,newPack) = if ((i.caller != economyAddr))
777931 then throw("permission denied")
778932 else $Tuple2([StringEntry(keyBackpackByDuck(duckAssetId), newPack)], newPack)
779933
780934
781935
782936 @Callable(i)
783937 func expeditionBuy (message,sig) = if ((size(i.payments) != 1))
784938 then throw("Exactly one payment required")
785939 else {
786940 let pmt = value(i.payments[0])
787941 if ((pmt.assetId != usdnAssetId))
788942 then throw("Allowed USDN payment only!")
789943 else if ((pmt.amount != EXPUSDN))
790944 then throw(("Payment attached should be " + toString(EXPUSDN)))
791- else expeditionCommon(false, i.caller, i.transactionId, message, sig)
945+ else {
946+ let result = expeditionCommon(false, i.caller, i.transactionId, message, sig)
947+ $Tuple2((result._1 :+ ScriptTransfer(economyAddr, pmt.amount, usdnAssetId)), result._2)
948+ }
792949 }
793950
794951
795952
796953 @Callable(i)
797954 func expedition (message,sig) = if ((size(i.payments) != 0))
798955 then throw("expedition doesn't require any payments")
799956 else expeditionCommon(true, i.caller, i.transactionId, message, sig)
800957
801958
802959
803960 @Callable(i)
804961 func upgradeInfra (landAssetIdIgnored) = if ((size(i.payments) != 0))
805962 then throw("Infrastructure upgrade doesn't require any payments")
806963 else upInfraCommon(true, i.caller, 0)
807964
808965
809966
810967 @Callable(i)
811968 func upgradeInfraUsdn (landAssetIdIgnored) = if ((size(i.payments) != 1))
812969 then throw("Exactly one payment required")
813970 else {
814971 let pmt = value(i.payments[0])
815972 if ((pmt.assetId != usdnAssetId))
816973 then throw("Allowed USDN payment only!")
817- else upInfraCommon(false, i.caller, pmt.amount)
974+ else {
975+ let result = upInfraCommon(false, i.caller, pmt.amount)
976+ $Tuple2((result._1 :+ ScriptTransfer(economyAddr, pmt.amount, usdnAssetId)), result._2)
977+ }
818978 }
819979
820980
821981
822982 @Callable(i)
823983 func activateArtifact (artName) = if ((size(i.payments) != 0))
824984 then throw("Artifact activation doesn't require any payments")
825985 else {
826986 let result = match artName {
827987 case _ =>
828988 if (("PRESALE" == $match0))
829989 then activatePresaleArt(toString(i.caller))
830990 else throw("Unknown artifact")
831991 }
832992 result
833993 }
834994
835995
996+
997+@Callable(i)
998+func mergeLands (landAssetIds) = if ((size(i.payments) != 0))
999+ then throw("Lands merging doesn't require any payments")
1000+ else mergeCommon(true, toString(i.caller), 0, landAssetIds, i.transactionId)
1001+
1002+
1003+
1004+@Callable(i)
1005+func mergeLandsUsdn (landAssetIds) = if ((size(i.payments) != 1))
1006+ then throw("Exactly one payment required")
1007+ else {
1008+ let pmt = value(i.payments[0])
1009+ if ((pmt.assetId != usdnAssetId))
1010+ then throw("Allowed USDN payment only!")
1011+ else {
1012+ let result = mergeCommon(false, toString(i.caller), pmt.amount, landAssetIds, i.transactionId)
1013+ $Tuple2((result._1 :+ ScriptTransfer(economyAddr, pmt.amount, usdnAssetId)), result._2)
1014+ }
1015+ }
1016+
1017+

github/deemru/w8io/026f985 
121.12 ms