tx · 3kdaZ5sHGDHH1LJEs8F2ULn5UyAp38iW61jJoZBE9ybX

3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep:  -0.06200000 Waves

2023.10.25 21:02 [2814490] smart account 3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep > SELF 0.00000000 Waves

{ "type": 13, "id": "3kdaZ5sHGDHH1LJEs8F2ULn5UyAp38iW61jJoZBE9ybX", "fee": 6200000, "feeAssetId": null, "timestamp": 1698257000770, "version": 2, "chainId": 84, "sender": "3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep", "senderPublicKey": "7v5L7QkXxfkirALdyqmox38QCsa9jtfAtgUfHTh34eWq", "proofs": [ "2d8gog22qgUbLUhFJKTb6cDZtevzG5pLL88TryC1839qczNKPicTBTvBJZqgQsCAXkGWbkHNt3kU2PcybuNAoQLU" ], "script": "base64:BgKVAQgCEgQKAggYEgMKAQgSBAoCERESBAoCCAESAwoBARIFCgMREQgSBgoEEREICBIECgIRERIFCgMREQgSBgoEEREICBIDCgEREgMKARESBAoCEQgSBAoCAQESBQoDAQEIEgYKBAEBCAgSBAoCCAgSBQoDCAgIEgQKAggIEgUKAwgICBIDCgEREgMKAQgSAwoBARIDCgEIaQAHeHBUcmFkZQCQTgAHeHBDcmFmdACQTgAKeHBTZWxsVG9FcwCQTgAGeHBTaG9wAJBOAApMQU5EUFJFRklYAgRMQU5EAAZOVU1SRVMABgAPREVGQVVMVExPQ0FUSU9OAg9BZnJpY2FfRl9BZnJpY2EAEFJFU09VUkNFUFJJQ0VNSU4A1bUCAA1FU01BWFBBQ0tBR0VTAAoACUVTQlVZQ09FRgAEABVNSU5fVVNEVF9GRUVfREVMSVZFUlkA0IYDABdNSU5fVVNEVF9GRUVfREVMSVZFUlkxNQD4yQQAD0NSQUZUX1VTRFRfQ09TVADAhD0AFENSQUZUX0RFTElWRVJZX0NPRUZGAAoAFVVTRFQyQUNSRVNfTVVMVElQTElFUgAKAAhyZXNUeXBlcwkAzAgCAgNPa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QDMCAIJAQxJbnRlZ2VyRW50cnkCBRFkZWxpdmVyeUxvY2tlZEtleQUJbmV3QW1vdW50BQNuaWwFCW5ld0Ftb3VudAFpARJzZW5kRGVsaXZlcnlSZXdhcmQBBGFkZHIDCQECIT0CCAUBaQZjYWxsZXIFD3N0YWtpbmdDb250cmFjdAkAAgECEVBlcm1pc3Npb24gZGVuaWVkBAlmdW5kVG90YWwJAQt2YWx1ZU9yRWxzZQIJAJ8IAQUPZGVsaXZlcnlGdW5kS2V5AAAEC2xvY2tlZFRvdGFsCQELdmFsdWVPckVsc2UCCQCfCAEFEWRlbGl2ZXJ5TG9ja2VkS2V5AAAEC2FjcmVzQW1vdW50CQBoAgUVTUlOX1VTRFRfRkVFX0RFTElWRVJZBRVVU0RUMkFDUkVTX01VTFRJUExJRVIEC2FjcmVzUmVzdWx0CQD8BwQFDWFjcmVzQ29udHJhY3QCCXNlbmRBY3JlcwkAzAgCBQRhZGRyCQDMCAIFC2FjcmVzQW1vdW50BQNuaWwFA25pbAkAlAoCCQDMCAIJAQxJbnRlZ2VyRW50cnkCBQ9kZWxpdmVyeUZ1bmRLZXkJAGUCBQlmdW5kVG90YWwFFU1JTl9VU0RUX0ZFRV9ERUxJVkVSWQkAzAgCCQEMSW50ZWdlckVudHJ5AgURZGVsaXZlcnlMb2NrZWRLZXkJAGUCBQtsb2NrZWRUb3RhbAUVTUlOX1VTRFRfRkVFX0RFTElWRVJZBQNuaWwFC2FjcmVzUmVzdWx0AAiBl3E=", "height": 2814490, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7ALzi2wC8GDNAAek1dKHzwo6FJH5MbWWw29m4W4GqJKg Next: 6mkTN5Top9xkhR4PSRPWV9P8hhpuYd1s4G1FZSvkfBZz Diff:
OldNewDifferences
109109
110110 func getRecipeMaterials (recipe) = (parseIntValue(recipe[rIdxCoeff]) * COEFF2MAT)
111111
112-
113-let KS_ALLOW_DELIVERY = true
114112
115113 let chain = take(drop(this.bytes, 1), 1)
116114
720718 $Tuple3((acc._1 ++ x._1), (acc._2 + x._3), (acc._3 + x._4))
721719 }
722720
723- let $t02527025360 = {
721+ let $t02529225382 = {
724722 let $l = continents
725723 let $s = size($l)
726724 let $acc0 = $Tuple3(nil, 0, 0)
734732
735733 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
736734 }
737- let factoryActions = $t02527025360._1
738- let usdtReceived = $t02527025360._2
739- let totalRes = $t02527025360._3
735+ let factoryActions = $t02529225382._1
736+ let usdtReceived = $t02529225382._2
737+ let totalRes = $t02529225382._3
740738 let fee = fraction(usdtReceived, DELIVERY_FEE, MULT6)
741739 let activitiesAmount = (usdtReceived / 100)
742740 let usdtLeft = ((usdtReceived - activitiesAmount) - fee)
845843 else {
846844 let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
847845 let resList = split(currentPack[bpIdxRes], "_")
848- let $t02889329019 = sellResourcesCommon(resList, curLocation[locIdxId], amounts, minPrices)
849- let factoryActions = $t02889329019._1
850- let newRes = $t02889329019._2
851- let usdtReceived = $t02889329019._3
852- let totalRes = $t02889329019._4
846+ let $t02891529041 = sellResourcesCommon(resList, curLocation[locIdxId], amounts, minPrices)
847+ let factoryActions = $t02891529041._1
848+ let newRes = $t02891529041._2
849+ let usdtReceived = $t02891529041._3
850+ let totalRes = $t02891529041._4
853851 let activitiesAmount = (usdtReceived / 100)
854852 let newPack = makeString_2C([currentPack[bpIdxLevel], makeString(newRes, "_"), currentPack[bpIdxMat], currentPack[bpIdxProd]], ":")
855853 let backpackResult = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
867865 func sellResourcesWorld (addr,amount) = if ((i.caller != acresContract))
868866 then throw("Permission denied")
869867 else {
870- let $t02981129968 = sellResourcesWorldInternal(amount)
871- let factoryActions = $t02981129968._1
872- let usdtLeft = $t02981129968._2
873- let fee = $t02981129968._3
874- let activitiesAmount = $t02981129968._4
875- let totalRes = $t02981129968._5
868+ let $t02983329990 = sellResourcesWorldInternal(amount)
869+ let factoryActions = $t02983329990._1
870+ let usdtLeft = $t02983329990._2
871+ let fee = $t02983329990._3
872+ let activitiesAmount = $t02983329990._4
873+ let totalRes = $t02983329990._5
876874 if ((0 >= usdtLeft))
877875 then throw(("This trade does not cover delivery cost of " + fixedPoint(fee, 6)))
878876 else {
892890
893891
894892 @Callable(i)
895-func sellResourcesDuckDelivery (amounts,minPrices,factoryContinent) = if (!(KS_ALLOW_DELIVERY))
896- then throw("Delivery feature is turned off!")
897- else {
898- let prologResult = prolog()
899- if ((prologResult == prologResult))
900- then {
901- let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
902- if ((size(i.payments) != 0))
903- then throw("sellResources doesn't require any payments")
904- else {
905- let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
906- let resList = split(currentPack[bpIdxRes], "_")
907- let $t03120431325 = sellResourcesCommon(resList, factoryContinent, amounts, minPrices)
908- let factoryActions = $t03120431325._1
909- let newRes = $t03120431325._2
910- let usdtReceived = $t03120431325._3
911- let totalRes = $t03120431325._4
912- let newPack = makeString_2C([currentPack[bpIdxLevel], makeString(newRes, "_"), currentPack[bpIdxMat], currentPack[bpIdxProd]], ":")
913- let backpackResult = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
914- let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpTrade, totalRes, MULT8)], nil))
915- let feePart = fraction(usdtReceived, DELIVERY_FEE, MULT6)
916- let fee = max([feePart, MIN_USDT_FEE_DELIVERY])
917- let activitiesAmount = (usdtReceived / 100)
918- if ((fee >= (usdtReceived - activitiesAmount)))
919- then throw(("This trade does not cover delivery cost of " + fixedPoint(fee, 6)))
920- else {
921- let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
922- $Tuple2((((factoryActions :+ ScriptTransfer(i.caller, ((usdtReceived - activitiesAmount) - fee), usdtAssetId)) :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)), $Tuple3(backpackResult, prologResult, statsResult))
923- }
924- }
925- }
926- else throw("Strict value is not equal to itself.")
927- }
893+func sellResourcesDuckDelivery (amounts,minPrices,factoryContinent) = {
894+ let prologResult = prolog()
895+ if ((prologResult == prologResult))
896+ then {
897+ let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
898+ if ((size(i.payments) != 0))
899+ then throw("sellResources doesn't require any payments")
900+ else {
901+ let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
902+ let resList = split(currentPack[bpIdxRes], "_")
903+ let $t03114931270 = sellResourcesCommon(resList, factoryContinent, amounts, minPrices)
904+ let factoryActions = $t03114931270._1
905+ let newRes = $t03114931270._2
906+ let usdtReceived = $t03114931270._3
907+ let totalRes = $t03114931270._4
908+ let newPack = makeString_2C([currentPack[bpIdxLevel], makeString(newRes, "_"), currentPack[bpIdxMat], currentPack[bpIdxProd]], ":")
909+ let backpackResult = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
910+ let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpTrade, totalRes, MULT8)], nil))
911+ let feePart = fraction(usdtReceived, DELIVERY_FEE, MULT6)
912+ let fee = max([feePart, MIN_USDT_FEE_DELIVERY])
913+ let activitiesAmount = (usdtReceived / 100)
914+ if ((fee >= (usdtReceived - activitiesAmount)))
915+ then throw(("This trade does not cover delivery cost of " + fixedPoint(fee, 6)))
916+ else {
917+ let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
918+ $Tuple2((((factoryActions :+ ScriptTransfer(i.caller, ((usdtReceived - activitiesAmount) - fee), usdtAssetId)) :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)), $Tuple3(backpackResult, prologResult, statsResult))
919+ }
920+ }
921+ }
922+ else throw("Strict value is not equal to itself.")
923+ }
928924
929925
930926
931927 @Callable(i)
932-func sellResourcesLandDelivery (amounts,minPrices,landAssetId,factoryContinent) = if (!(KS_ALLOW_DELIVERY))
933- then throw("Delivery feature is turned off!")
934- else {
935- let prologResult = prolog()
936- if ((prologResult == prologResult))
937- then if ((size(i.payments) != 0))
938- then throw("sellResources doesn't require any payments")
939- else {
940- let user = i.caller
941- let addr = toString(user)
942- let asset = value(assetInfo(fromBase58String(landAssetId)))
943- if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
944- then throw((("NFT " + asset.name) + " is not staked"))
945- else {
946- let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
947- if ((owner != addr))
948- then throw((LANDPREFIX + " is not yours"))
949- else {
950- let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
951- let currentWh = split_4C(wh, ":")
952- let resList = split(currentWh[whIdxRes], "_")
953- let $t03331633437 = sellResourcesCommon(resList, factoryContinent, amounts, minPrices)
954- let factoryActions = $t03331633437._1
955- let newRes = $t03331633437._2
956- let usdtReceived = $t03331633437._3
957- let totalRes = $t03331633437._4
958- let whStr = makeString_2C([currentWh[whIdxLevels], makeString(newRes, "_"), currentWh[whIdxMat], currentWh[whIdxProd], currentWh[whIdxLOFT]], ":")
959- let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil))
960- let statsResult = asInt(invoke(stakingContract, "updateAccStats", [addr, fraction(xpTrade, totalRes, MULT8)], nil))
961- let feePart = fraction(usdtReceived, DELIVERY_FEE, MULT6)
962- let fee = max([feePart, MIN_USDT_FEE_DELIVERY])
963- let activitiesAmount = (usdtReceived / 100)
964- if ((fee >= (usdtReceived - activitiesAmount)))
965- then throw(("This trade does not cover delivery cost of " + fixedPoint(fee, 6)))
966- else {
967- let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
968- $Tuple2((((factoryActions :+ ScriptTransfer(i.caller, ((usdtReceived - activitiesAmount) - fee), usdtAssetId)) :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)), $Tuple3(whSave, prologResult, statsResult))
969- }
970- }
971- }
972- }
973- else throw("Strict value is not equal to itself.")
974- }
928+func sellResourcesLandDelivery (amounts,minPrices,landAssetId,factoryContinent) = {
929+ let prologResult = prolog()
930+ if ((prologResult == prologResult))
931+ then if ((size(i.payments) != 0))
932+ then throw("sellResources doesn't require any payments")
933+ else {
934+ let user = i.caller
935+ let addr = toString(user)
936+ let asset = value(assetInfo(fromBase58String(landAssetId)))
937+ if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
938+ then throw((("NFT " + asset.name) + " is not staked"))
939+ else {
940+ let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
941+ if ((owner != addr))
942+ then throw((LANDPREFIX + " is not yours"))
943+ else {
944+ let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
945+ let currentWh = split_4C(wh, ":")
946+ let resList = split(currentWh[whIdxRes], "_")
947+ let $t03318433305 = sellResourcesCommon(resList, factoryContinent, amounts, minPrices)
948+ let factoryActions = $t03318433305._1
949+ let newRes = $t03318433305._2
950+ let usdtReceived = $t03318433305._3
951+ let totalRes = $t03318433305._4
952+ let whStr = makeString_2C([currentWh[whIdxLevels], makeString(newRes, "_"), currentWh[whIdxMat], currentWh[whIdxProd], currentWh[whIdxLOFT]], ":")
953+ let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil))
954+ let statsResult = asInt(invoke(stakingContract, "updateAccStats", [addr, fraction(xpTrade, totalRes, MULT8)], nil))
955+ let feePart = fraction(usdtReceived, DELIVERY_FEE, MULT6)
956+ let fee = max([feePart, MIN_USDT_FEE_DELIVERY])
957+ let activitiesAmount = (usdtReceived / 100)
958+ if ((fee >= (usdtReceived - activitiesAmount)))
959+ then throw(("This trade does not cover delivery cost of " + fixedPoint(fee, 6)))
960+ else {
961+ let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
962+ $Tuple2((((factoryActions :+ ScriptTransfer(i.caller, ((usdtReceived - activitiesAmount) - fee), usdtAssetId)) :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)), $Tuple3(whSave, prologResult, statsResult))
963+ }
964+ }
965+ }
966+ }
967+ else throw("Strict value is not equal to itself.")
968+ }
975969
976970
977971
997991 else {
998992 let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
999993 let matList = split(currentPack[bpIdxMat], "_")
1000- let $t03526135383 = buyMaterialsCommon(matList, curLocation[locIdxId], amounts, maxPrices)
1001- let factoryActions = $t03526135383._1
1002- let newMat = $t03526135383._2
1003- let usdtSpent = $t03526135383._3
1004- let totalMat = $t03526135383._4
994+ let $t03512935251 = buyMaterialsCommon(matList, curLocation[locIdxId], amounts, maxPrices)
995+ let factoryActions = $t03512935251._1
996+ let newMat = $t03512935251._2
997+ let usdtSpent = $t03512935251._3
998+ let totalMat = $t03512935251._4
1005999 if ((usdtSpent > amt))
10061000 then throw(((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(usdtSpent, 6)))
10071001 else {
10241018
10251019
10261020 @Callable(i)
1027-func buyMaterialsDuckDelivery (amounts,maxPrices,factoryContinent) = if (!(KS_ALLOW_DELIVERY))
1028- then throw("Delivery feature is turned off!")
1029- else {
1030- let prologResult = prolog()
1031- if ((prologResult == prologResult))
1032- then {
1033- let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
1034- if ((size(i.payments) != 1))
1035- then throw("exactly 1 payment must be attached")
1036- else {
1037- let pmt = i.payments[0]
1038- let amt = pmt.amount
1039- if (if (!(isDefined(pmt.assetId)))
1040- then true
1041- else (value(pmt.assetId) != usdtAssetId))
1042- then throw("USDT payments only!")
1043- else {
1044- let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
1045- let matList = split(currentPack[bpIdxMat], "_")
1046- let $t03690437021 = buyMaterialsCommon(matList, factoryContinent, amounts, maxPrices)
1047- let factoryActions = $t03690437021._1
1048- let newMat = $t03690437021._2
1049- let usdtSpent = $t03690437021._3
1050- let totalMat = $t03690437021._4
1051- let newPack = makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], makeString(newMat, "_"), currentPack[bpIdxProd]], ":")
1052- let backpackResult = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
1053- let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpTrade, totalMat, MULT8)], nil))
1054- let feePart = fraction(usdtSpent, DELIVERY_FEE, MULT6)
1055- let fee = max([feePart, MIN_USDT_FEE_DELIVERY])
1056- let usdtSpentWithFee = (usdtSpent + fee)
1057- if ((usdtSpentWithFee > amt))
1058- then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(usdtSpent, 6)) + "+") + fixedPoint(fee, 6)) + "(delivery fee)"))
1059- else {
1060- let rest = if (((amt - usdtSpentWithFee) > 0))
1061- then [ScriptTransfer(i.caller, (amt - usdtSpentWithFee), usdtAssetId)]
1062- else nil
1063- let activitiesAmount = (usdtSpent / 100)
1064- let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1065- $Tuple2((((factoryActions ++ rest) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)) :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))), $Tuple3(backpackResult, prologResult, statsResult))
1066- }
1067- }
1068- }
1069- }
1070- else throw("Strict value is not equal to itself.")
1071- }
1072-
1073-
1074-
1075-@Callable(i)
1076-func buyMaterialsLandDelivery (amounts,maxPrices,landAssetId,factoryContinent) = if (!(KS_ALLOW_DELIVERY))
1077- then throw("Delivery feature is turned off!")
1078- else {
1079- let prologResult = prolog()
1080- if ((prologResult == prologResult))
1081- then if ((size(i.payments) != 1))
1021+func buyMaterialsDuckDelivery (amounts,maxPrices,factoryContinent) = {
1022+ let prologResult = prolog()
1023+ if ((prologResult == prologResult))
1024+ then {
1025+ let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
1026+ if ((size(i.payments) != 1))
10821027 then throw("exactly 1 payment must be attached")
10831028 else {
10841029 let pmt = i.payments[0]
10881033 else (value(pmt.assetId) != usdtAssetId))
10891034 then throw("USDT payments only!")
10901035 else {
1091- let user = i.caller
1092- let addr = toString(user)
1093- let asset = value(assetInfo(fromBase58String(landAssetId)))
1094- if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
1095- then throw((("NFT " + asset.name) + " is not staked"))
1036+ let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
1037+ let matList = split(currentPack[bpIdxMat], "_")
1038+ let $t03669536812 = buyMaterialsCommon(matList, factoryContinent, amounts, maxPrices)
1039+ let factoryActions = $t03669536812._1
1040+ let newMat = $t03669536812._2
1041+ let usdtSpent = $t03669536812._3
1042+ let totalMat = $t03669536812._4
1043+ let newPack = makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], makeString(newMat, "_"), currentPack[bpIdxProd]], ":")
1044+ let backpackResult = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
1045+ let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpTrade, totalMat, MULT8)], nil))
1046+ let feePart = fraction(usdtSpent, DELIVERY_FEE, MULT6)
1047+ let fee = max([feePart, MIN_USDT_FEE_DELIVERY])
1048+ let usdtSpentWithFee = (usdtSpent + fee)
1049+ if ((usdtSpentWithFee > amt))
1050+ then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(usdtSpent, 6)) + "+") + fixedPoint(fee, 6)) + "(delivery fee)"))
10961051 else {
1097- let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
1098- if ((owner != addr))
1099- then throw((LANDPREFIX + " is not yours"))
1100- else {
1101- let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
1102- let currentWh = split_4C(wh, ":")
1103- let matList = split(currentWh[whIdxMat], "_")
1104- let $t03926339380 = buyMaterialsCommon(matList, factoryContinent, amounts, maxPrices)
1105- let factoryActions = $t03926339380._1
1106- let newMat = $t03926339380._2
1107- let usdtSpent = $t03926339380._3
1108- let totalMat = $t03926339380._4
1109- let whStr = makeString_2C([currentWh[whIdxLevels], currentWh[whIdxRes], makeString(newMat, "_"), currentWh[whIdxProd], currentWh[whIdxLOFT]], ":")
1110- let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil))
1111- let statsResult = asInt(invoke(stakingContract, "updateAccStats", [addr, fraction(xpTrade, totalMat, MULT8)], nil))
1112- let feePart = fraction(usdtSpent, DELIVERY_FEE, MULT6)
1113- let fee = max([feePart, MIN_USDT_FEE_DELIVERY])
1114- let usdtSpentWithFee = (usdtSpent + fee)
1115- if ((usdtSpentWithFee > amt))
1116- then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(usdtSpent, 6)) + "+") + fixedPoint(fee, 6)) + "(delivery fee)"))
1117- else {
1118- let rest = if (((amt - usdtSpentWithFee) > 0))
1119- then [ScriptTransfer(i.caller, (amt - usdtSpentWithFee), usdtAssetId)]
1120- else nil
1121- let activitiesAmount = (usdtSpent / 100)
1122- let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1123- $Tuple2((((factoryActions ++ rest) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)) :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))), $Tuple3(whSave, prologResult, statsResult))
1124- }
1125- }
1052+ let rest = if (((amt - usdtSpentWithFee) > 0))
1053+ then [ScriptTransfer(i.caller, (amt - usdtSpentWithFee), usdtAssetId)]
1054+ else nil
1055+ let activitiesAmount = (usdtSpent / 100)
1056+ let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1057+ $Tuple2((((factoryActions ++ rest) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)) :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))), $Tuple3(backpackResult, prologResult, statsResult))
11261058 }
11271059 }
11281060 }
1129- else throw("Strict value is not equal to itself.")
1130- }
1061+ }
1062+ else throw("Strict value is not equal to itself.")
1063+ }
1064+
1065+
1066+
1067+@Callable(i)
1068+func buyMaterialsLandDelivery (amounts,maxPrices,landAssetId,factoryContinent) = {
1069+ let prologResult = prolog()
1070+ if ((prologResult == prologResult))
1071+ then if ((size(i.payments) != 1))
1072+ then throw("exactly 1 payment must be attached")
1073+ else {
1074+ let pmt = i.payments[0]
1075+ let amt = pmt.amount
1076+ if (if (!(isDefined(pmt.assetId)))
1077+ then true
1078+ else (value(pmt.assetId) != usdtAssetId))
1079+ then throw("USDT payments only!")
1080+ else {
1081+ let user = i.caller
1082+ let addr = toString(user)
1083+ let asset = value(assetInfo(fromBase58String(landAssetId)))
1084+ if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
1085+ then throw((("NFT " + asset.name) + " is not staked"))
1086+ else {
1087+ let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
1088+ if ((owner != addr))
1089+ then throw((LANDPREFIX + " is not yours"))
1090+ else {
1091+ let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
1092+ let currentWh = split_4C(wh, ":")
1093+ let matList = split(currentWh[whIdxMat], "_")
1094+ let $t03897739094 = buyMaterialsCommon(matList, factoryContinent, amounts, maxPrices)
1095+ let factoryActions = $t03897739094._1
1096+ let newMat = $t03897739094._2
1097+ let usdtSpent = $t03897739094._3
1098+ let totalMat = $t03897739094._4
1099+ let whStr = makeString_2C([currentWh[whIdxLevels], currentWh[whIdxRes], makeString(newMat, "_"), currentWh[whIdxProd], currentWh[whIdxLOFT]], ":")
1100+ let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil))
1101+ let statsResult = asInt(invoke(stakingContract, "updateAccStats", [addr, fraction(xpTrade, totalMat, MULT8)], nil))
1102+ let feePart = fraction(usdtSpent, DELIVERY_FEE, MULT6)
1103+ let fee = max([feePart, MIN_USDT_FEE_DELIVERY])
1104+ let usdtSpentWithFee = (usdtSpent + fee)
1105+ if ((usdtSpentWithFee > amt))
1106+ then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(usdtSpent, 6)) + "+") + fixedPoint(fee, 6)) + "(delivery fee)"))
1107+ else {
1108+ let rest = if (((amt - usdtSpentWithFee) > 0))
1109+ then [ScriptTransfer(i.caller, (amt - usdtSpentWithFee), usdtAssetId)]
1110+ else nil
1111+ let activitiesAmount = (usdtSpent / 100)
1112+ let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1113+ $Tuple2((((factoryActions ++ rest) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)) :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))), $Tuple3(whSave, prologResult, statsResult))
1114+ }
1115+ }
1116+ }
1117+ }
1118+ }
1119+ else throw("Strict value is not equal to itself.")
1120+ }
11311121
11321122
11331123
11541144 let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
11551145 let resList = split(currentPack[bpIdxRes], "_")
11561146 let matList = split(currentPack[bpIdxMat], "_")
1157- let $t04145841564 = exchangeResourcesCommon(resList, matList, amounts)
1158- let newRes = $t04145841564._1
1159- let newMat = $t04145841564._2
1160- let usdtSpent = $t04145841564._3
1161- let totalAmountConverted = $t04145841564._4
1147+ let $t04117241278 = exchangeResourcesCommon(resList, matList, amounts)
1148+ let newRes = $t04117241278._1
1149+ let newMat = $t04117241278._2
1150+ let usdtSpent = $t04117241278._3
1151+ let totalAmountConverted = $t04117241278._4
11621152 if ((usdtSpent > amt))
11631153 then throw(((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(usdtSpent, 6)))
11641154 else {
11811171
11821172
11831173 @Callable(i)
1184-func exchangeResourcesDuckDelivery (amounts) = if (!(KS_ALLOW_DELIVERY))
1185- then throw("Delivery feature is turned off!")
1186- else {
1187- let prologResult = prolog()
1188- if ((prologResult == prologResult))
1189- then {
1190- let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
1191- if ((size(i.payments) != 1))
1192- then throw("exactly 1 payment must be attached")
1193- else {
1194- let pmt = i.payments[0]
1195- let amt = pmt.amount
1196- if (if (!(isDefined(pmt.assetId)))
1197- then true
1198- else (value(pmt.assetId) != usdtAssetId))
1199- then throw("USDT payments only!")
1200- else {
1201- let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
1202- let resList = split(currentPack[bpIdxRes], "_")
1203- let matList = split(currentPack[bpIdxMat], "_")
1204- let $t04307943185 = exchangeResourcesCommon(resList, matList, amounts)
1205- let newRes = $t04307943185._1
1206- let newMat = $t04307943185._2
1207- let usdtSpent = $t04307943185._3
1208- let totalAmountConverted = $t04307943185._4
1209- let feePart = fraction(usdtSpent, DELIVERY_FEE15, MULT6)
1210- let fee = max([feePart, MIN_USDT_FEE_DELIVERY15])
1211- let usdtSpentWithFee = (usdtSpent + fee)
1212- if ((usdtSpentWithFee > amt))
1213- then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(usdtSpent, 6)) + "+") + fixedPoint(fee, 6)) + "(delivery fee)"))
1214- else {
1215- let newPack = makeString([currentPack[bpIdxLevel], makeString(newRes, "_"), makeString(newMat, "_"), currentPack[bpIdxProd]], ":")
1216- let backpackResult = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
1217- let rest = if (((amt - usdtSpentWithFee) > 0))
1218- then [ScriptTransfer(i.caller, (amt - usdtSpentWithFee), usdtAssetId)]
1219- else nil
1220- let activitiesAmount = (usdtSpent / 100)
1221- let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpTrade, totalAmountConverted, MULT8)], nil))
1222- let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1223- $Tuple2(((rest :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)) :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))), $Tuple3(backpackResult, prologResult, statsResult))
1224- }
1225- }
1226- }
1227- }
1228- else throw("Strict value is not equal to itself.")
1229- }
1230-
1231-
1232-
1233-@Callable(i)
1234-func exchangeResourcesLandDelivery (amounts,landAssetId) = if (!(KS_ALLOW_DELIVERY))
1235- then throw("Delivery feature is turned off!")
1236- else {
1237- let prologResult = prolog()
1238- if ((prologResult == prologResult))
1239- then if ((size(i.payments) != 1))
1174+func exchangeResourcesDuckDelivery (amounts) = {
1175+ let prologResult = prolog()
1176+ if ((prologResult == prologResult))
1177+ then {
1178+ let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
1179+ if ((size(i.payments) != 1))
12401180 then throw("exactly 1 payment must be attached")
12411181 else {
12421182 let pmt = i.payments[0]
12461186 else (value(pmt.assetId) != usdtAssetId))
12471187 then throw("USDT payments only!")
12481188 else {
1249- let user = i.caller
1250- let addr = toString(user)
1251- let asset = value(assetInfo(fromBase58String(landAssetId)))
1252- if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
1253- then throw((("NFT " + asset.name) + " is not staked"))
1189+ let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
1190+ let resList = split(currentPack[bpIdxRes], "_")
1191+ let matList = split(currentPack[bpIdxMat], "_")
1192+ let $t04271642822 = exchangeResourcesCommon(resList, matList, amounts)
1193+ let newRes = $t04271642822._1
1194+ let newMat = $t04271642822._2
1195+ let usdtSpent = $t04271642822._3
1196+ let totalAmountConverted = $t04271642822._4
1197+ let feePart = fraction(usdtSpent, DELIVERY_FEE15, MULT6)
1198+ let fee = max([feePart, MIN_USDT_FEE_DELIVERY15])
1199+ let usdtSpentWithFee = (usdtSpent + fee)
1200+ if ((usdtSpentWithFee > amt))
1201+ then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(usdtSpent, 6)) + "+") + fixedPoint(fee, 6)) + "(delivery fee)"))
12541202 else {
1255- let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
1256- if ((owner != addr))
1257- then throw((LANDPREFIX + " is not yours"))
1258- else {
1259- let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
1260- let currentWh = split_4C(wh, ":")
1261- let resList = split(currentWh[whIdxRes], "_")
1262- let matList = split(currentWh[whIdxMat], "_")
1263- let $t04544745553 = exchangeResourcesCommon(resList, matList, amounts)
1264- let newRes = $t04544745553._1
1265- let newMat = $t04544745553._2
1266- let usdtSpent = $t04544745553._3
1267- let totalAmountConverted = $t04544745553._4
1268- let whStr = makeString_2C([currentWh[whIdxLevels], makeString(newRes, "_"), makeString(newMat, "_"), currentWh[whIdxProd], currentWh[whIdxLOFT]], ":")
1269- let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil))
1270- let statsResult = asInt(invoke(stakingContract, "updateAccStats", [addr, fraction(xpTrade, totalAmountConverted, MULT8)], nil))
1271- let feePart = fraction(usdtSpent, DELIVERY_FEE15, MULT6)
1272- let fee = max([feePart, MIN_USDT_FEE_DELIVERY15])
1273- let usdtSpentWithFee = (usdtSpent + fee)
1274- if ((usdtSpentWithFee > amt))
1275- then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(usdtSpent, 6)) + "+") + fixedPoint(fee, 6)) + "(delivery fee)"))
1276- else {
1277- let rest = if (((amt - usdtSpentWithFee) > 0))
1278- then [ScriptTransfer(i.caller, (amt - usdtSpentWithFee), usdtAssetId)]
1279- else nil
1280- let activitiesAmount = (usdtSpent / 100)
1281- let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1282- $Tuple2(((rest :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)) :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))), $Tuple3(whSave, prologResult, statsResult))
1283- }
1284- }
1203+ let newPack = makeString([currentPack[bpIdxLevel], makeString(newRes, "_"), makeString(newMat, "_"), currentPack[bpIdxProd]], ":")
1204+ let backpackResult = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
1205+ let rest = if (((amt - usdtSpentWithFee) > 0))
1206+ then [ScriptTransfer(i.caller, (amt - usdtSpentWithFee), usdtAssetId)]
1207+ else nil
1208+ let activitiesAmount = (usdtSpent / 100)
1209+ let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpTrade, totalAmountConverted, MULT8)], nil))
1210+ let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1211+ $Tuple2(((rest :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)) :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))), $Tuple3(backpackResult, prologResult, statsResult))
12851212 }
12861213 }
12871214 }
1288- else throw("Strict value is not equal to itself.")
1289- }
1215+ }
1216+ else throw("Strict value is not equal to itself.")
1217+ }
1218+
1219+
1220+
1221+@Callable(i)
1222+func exchangeResourcesLandDelivery (amounts,landAssetId) = {
1223+ let prologResult = prolog()
1224+ if ((prologResult == prologResult))
1225+ then if ((size(i.payments) != 1))
1226+ then throw("exactly 1 payment must be attached")
1227+ else {
1228+ let pmt = i.payments[0]
1229+ let amt = pmt.amount
1230+ if (if (!(isDefined(pmt.assetId)))
1231+ then true
1232+ else (value(pmt.assetId) != usdtAssetId))
1233+ then throw("USDT payments only!")
1234+ else {
1235+ let user = i.caller
1236+ let addr = toString(user)
1237+ let asset = value(assetInfo(fromBase58String(landAssetId)))
1238+ if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
1239+ then throw((("NFT " + asset.name) + " is not staked"))
1240+ else {
1241+ let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
1242+ if ((owner != addr))
1243+ then throw((LANDPREFIX + " is not yours"))
1244+ else {
1245+ let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
1246+ let currentWh = split_4C(wh, ":")
1247+ let resList = split(currentWh[whIdxRes], "_")
1248+ let matList = split(currentWh[whIdxMat], "_")
1249+ let $t04500745113 = exchangeResourcesCommon(resList, matList, amounts)
1250+ let newRes = $t04500745113._1
1251+ let newMat = $t04500745113._2
1252+ let usdtSpent = $t04500745113._3
1253+ let totalAmountConverted = $t04500745113._4
1254+ let whStr = makeString_2C([currentWh[whIdxLevels], makeString(newRes, "_"), makeString(newMat, "_"), currentWh[whIdxProd], currentWh[whIdxLOFT]], ":")
1255+ let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil))
1256+ let statsResult = asInt(invoke(stakingContract, "updateAccStats", [addr, fraction(xpTrade, totalAmountConverted, MULT8)], nil))
1257+ let feePart = fraction(usdtSpent, DELIVERY_FEE15, MULT6)
1258+ let fee = max([feePart, MIN_USDT_FEE_DELIVERY15])
1259+ let usdtSpentWithFee = (usdtSpent + fee)
1260+ if ((usdtSpentWithFee > amt))
1261+ then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(usdtSpent, 6)) + "+") + fixedPoint(fee, 6)) + "(delivery fee)"))
1262+ else {
1263+ let rest = if (((amt - usdtSpentWithFee) > 0))
1264+ then [ScriptTransfer(i.caller, (amt - usdtSpentWithFee), usdtAssetId)]
1265+ else nil
1266+ let activitiesAmount = (usdtSpent / 100)
1267+ let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1268+ $Tuple2(((rest :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)) :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))), $Tuple3(whSave, prologResult, statsResult))
1269+ }
1270+ }
1271+ }
1272+ }
1273+ }
1274+ else throw("Strict value is not equal to itself.")
1275+ }
12901276
12911277
12921278
13171303 let prodList = if ((currentPack[bpIdxProd] == ""))
13181304 then nil
13191305 else split_4C(currentPack[bpIdxProd], "_")
1320- let $t04787847975 = craftGoodsCommon(matList, prodList, cont, productIdx, quantity)
1321- let newMat = $t04787847975._1
1322- let newProd = $t04787847975._2
1323- let matSpent = $t04787847975._3
1306+ let $t04743847535 = craftGoodsCommon(matList, prodList, cont, productIdx, quantity)
1307+ let newMat = $t04743847535._1
1308+ let newProd = $t04743847535._2
1309+ let matSpent = $t04743847535._3
13241310 let newPack = makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], makeString(newMat, "_"), makeString_2C(newProd, "_")], ":")
13251311 let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
13261312 let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpCraft, matSpent, MULT8)], nil))
13341320
13351321
13361322 @Callable(i)
1337-func craftGoodsDuckDelivery (productIdx,quantity,manufactoryContinent) = if (!(KS_ALLOW_DELIVERY))
1338- then throw("Delivery feature is turned off!")
1339- else {
1340- let prologResult = prolog()
1341- if ((prologResult == prologResult))
1342- then {
1343- let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
1344- if ((size(i.payments) != 1))
1345- then throw("exactly 1 payment must be attached")
1346- else {
1347- let pmt = i.payments[0]
1348- let amt = pmt.amount
1349- if (if (!(isDefined(pmt.assetId)))
1350- then true
1351- else (value(pmt.assetId) != usdtAssetId))
1352- then throw("USDT payments only!")
1353- else {
1354- let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
1355- let matList = split(currentPack[bpIdxMat], "_")
1356- let prodList = if ((currentPack[bpIdxProd] == ""))
1357- then nil
1358- else split_4C(currentPack[bpIdxProd], "_")
1359- let $t04920049313 = craftGoodsCommon(matList, prodList, manufactoryContinent, productIdx, quantity)
1360- let newMat = $t04920049313._1
1361- let newProd = $t04920049313._2
1362- let matSpent = $t04920049313._3
1363- let newPack = makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], makeString(newMat, "_"), makeString_2C(newProd, "_")], ":")
1364- let backpackResult = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
1365- let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpCraft, matSpent, MULT8)], nil))
1366- let feePart = fraction(quantity, MIN_USDT_FEE_DELIVERY, CRAFT_DELIVERY_COEFF)
1367- let fee = max([feePart, MIN_USDT_FEE_DELIVERY])
1368- let usdtSpentWithFee = (CRAFT_USDT_COST + fee)
1369- if ((usdtSpentWithFee > amt))
1370- then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(CRAFT_USDT_COST, 6)) + "+") + fixedPoint(fee, 6)) + "(delivery fee)"))
1371- else {
1372- let rest = if (((amt - usdtSpentWithFee) > 0))
1373- then [ScriptTransfer(i.caller, (amt - usdtSpentWithFee), usdtAssetId)]
1374- else nil
1375- let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1376- $Tuple2((rest :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))), $Tuple3(backpackResult, prologResult, statsResult))
1377- }
1378- }
1379- }
1380- }
1381- else throw("Strict value is not equal to itself.")
1382- }
1383-
1384-
1385-
1386-@Callable(i)
1387-func craftGoodsLandDelivery (productIdx,quantity,landAssetId,manufactoryContinent) = if (!(KS_ALLOW_DELIVERY))
1388- then throw("Delivery feature is turned off!")
1389- else {
1390- let prologResult = prolog()
1391- if ((prologResult == prologResult))
1392- then if ((size(i.payments) != 1))
1323+func craftGoodsDuckDelivery (productIdx,quantity,manufactoryContinent) = {
1324+ let prologResult = prolog()
1325+ if ((prologResult == prologResult))
1326+ then {
1327+ let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
1328+ if ((size(i.payments) != 1))
13931329 then throw("exactly 1 payment must be attached")
13941330 else {
13951331 let pmt = i.payments[0]
13991335 else (value(pmt.assetId) != usdtAssetId))
14001336 then throw("USDT payments only!")
14011337 else {
1402- let user = i.caller
1403- let addr = toString(user)
1404- let asset = value(assetInfo(fromBase58String(landAssetId)))
1405- if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
1406- then throw((("NFT " + asset.name) + " is not staked"))
1338+ let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
1339+ let matList = split(currentPack[bpIdxMat], "_")
1340+ let prodList = if ((currentPack[bpIdxProd] == ""))
1341+ then nil
1342+ else split_4C(currentPack[bpIdxProd], "_")
1343+ let $t04868348796 = craftGoodsCommon(matList, prodList, manufactoryContinent, productIdx, quantity)
1344+ let newMat = $t04868348796._1
1345+ let newProd = $t04868348796._2
1346+ let matSpent = $t04868348796._3
1347+ let newPack = makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], makeString(newMat, "_"), makeString_2C(newProd, "_")], ":")
1348+ let backpackResult = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
1349+ let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpCraft, matSpent, MULT8)], nil))
1350+ let feePart = fraction(quantity, MIN_USDT_FEE_DELIVERY, CRAFT_DELIVERY_COEFF)
1351+ let fee = max([feePart, MIN_USDT_FEE_DELIVERY])
1352+ let usdtSpentWithFee = (CRAFT_USDT_COST + fee)
1353+ if ((usdtSpentWithFee > amt))
1354+ then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(CRAFT_USDT_COST, 6)) + "+") + fixedPoint(fee, 6)) + "(delivery fee)"))
14071355 else {
1408- let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
1409- if ((owner != addr))
1410- then throw((LANDPREFIX + " is not yours"))
1411- else {
1412- let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
1413- let currentWh = split_4C(wh, ":")
1414- let matList = split(currentWh[whIdxMat], "_")
1415- let prodList = if ((currentWh[whIdxProd] == ""))
1416- then nil
1417- else split_4C(currentWh[whIdxProd], "_")
1418- let $t05155651669 = craftGoodsCommon(matList, prodList, manufactoryContinent, productIdx, quantity)
1419- let newMat = $t05155651669._1
1420- let newProd = $t05155651669._2
1421- let matSpent = $t05155651669._3
1422- let whStr = makeString_2C([currentWh[whIdxLevels], currentWh[whIdxRes], makeString(newMat, "_"), makeString_2C(newProd, "_"), currentWh[whIdxLOFT]], ":")
1423- let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil))
1424- let statsResult = asInt(invoke(stakingContract, "updateAccStats", [addr, fraction(xpCraft, matSpent, MULT8)], nil))
1425- let feePart = fraction(quantity, MIN_USDT_FEE_DELIVERY, CRAFT_DELIVERY_COEFF)
1426- let fee = max([feePart, MIN_USDT_FEE_DELIVERY])
1427- let usdtSpentWithFee = (CRAFT_USDT_COST + fee)
1428- if ((usdtSpentWithFee > amt))
1429- then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(CRAFT_USDT_COST, 6)) + "+") + fixedPoint(fee, 6)) + "(delivery fee)"))
1430- else {
1431- let rest = if (((amt - usdtSpentWithFee) > 0))
1432- then [ScriptTransfer(i.caller, (amt - usdtSpentWithFee), usdtAssetId)]
1433- else nil
1434- let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1435- $Tuple2((rest :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))), $Tuple3(whSave, prologResult, statsResult))
1436- }
1437- }
1356+ let rest = if (((amt - usdtSpentWithFee) > 0))
1357+ then [ScriptTransfer(i.caller, (amt - usdtSpentWithFee), usdtAssetId)]
1358+ else nil
1359+ let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1360+ $Tuple2((rest :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))), $Tuple3(backpackResult, prologResult, statsResult))
14381361 }
14391362 }
14401363 }
1441- else throw("Strict value is not equal to itself.")
1442- }
1364+ }
1365+ else throw("Strict value is not equal to itself.")
1366+ }
1367+
1368+
1369+
1370+@Callable(i)
1371+func craftGoodsLandDelivery (productIdx,quantity,landAssetId,manufactoryContinent) = {
1372+ let prologResult = prolog()
1373+ if ((prologResult == prologResult))
1374+ then if ((size(i.payments) != 1))
1375+ then throw("exactly 1 payment must be attached")
1376+ else {
1377+ let pmt = i.payments[0]
1378+ let amt = pmt.amount
1379+ if (if (!(isDefined(pmt.assetId)))
1380+ then true
1381+ else (value(pmt.assetId) != usdtAssetId))
1382+ then throw("USDT payments only!")
1383+ else {
1384+ let user = i.caller
1385+ let addr = toString(user)
1386+ let asset = value(assetInfo(fromBase58String(landAssetId)))
1387+ if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
1388+ then throw((("NFT " + asset.name) + " is not staked"))
1389+ else {
1390+ let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
1391+ if ((owner != addr))
1392+ then throw((LANDPREFIX + " is not yours"))
1393+ else {
1394+ let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
1395+ let currentWh = split_4C(wh, ":")
1396+ let matList = split(currentWh[whIdxMat], "_")
1397+ let prodList = if ((currentWh[whIdxProd] == ""))
1398+ then nil
1399+ else split_4C(currentWh[whIdxProd], "_")
1400+ let $t05096251075 = craftGoodsCommon(matList, prodList, manufactoryContinent, productIdx, quantity)
1401+ let newMat = $t05096251075._1
1402+ let newProd = $t05096251075._2
1403+ let matSpent = $t05096251075._3
1404+ let whStr = makeString_2C([currentWh[whIdxLevels], currentWh[whIdxRes], makeString(newMat, "_"), makeString_2C(newProd, "_"), currentWh[whIdxLOFT]], ":")
1405+ let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil))
1406+ let statsResult = asInt(invoke(stakingContract, "updateAccStats", [addr, fraction(xpCraft, matSpent, MULT8)], nil))
1407+ let feePart = fraction(quantity, MIN_USDT_FEE_DELIVERY, CRAFT_DELIVERY_COEFF)
1408+ let fee = max([feePart, MIN_USDT_FEE_DELIVERY])
1409+ let usdtSpentWithFee = (CRAFT_USDT_COST + fee)
1410+ if ((usdtSpentWithFee > amt))
1411+ then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(CRAFT_USDT_COST, 6)) + "+") + fixedPoint(fee, 6)) + "(delivery fee)"))
1412+ else {
1413+ let rest = if (((amt - usdtSpentWithFee) > 0))
1414+ then [ScriptTransfer(i.caller, (amt - usdtSpentWithFee), usdtAssetId)]
1415+ else nil
1416+ let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1417+ $Tuple2((rest :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))), $Tuple3(whSave, prologResult, statsResult))
1418+ }
1419+ }
1420+ }
1421+ }
1422+ }
1423+ else throw("Strict value is not equal to itself.")
1424+ }
14431425
14441426
14451427
15291511 let bpProdList = if ((currentPack[bpIdxProd] == ""))
15301512 then nil
15311513 else split_4C(currentPack[bpIdxProd], "_")
1532- let $t05758257822 = acceptShopOrderCommon(shopLandAssetId, callerAddr, bpOrderStr, bpResList, bpMatList, bpProdList)
1533- let shopAction = $t05758257822._1
1534- let newUserRes = $t05758257822._2
1535- let newUserMat = $t05758257822._3
1536- let newUserProd = $t05758257822._4
1537- let usdWh2BpSaldo = $t05758257822._5
1538- let usdBp2WhSaldo = $t05758257822._6
1539- let xpAmount = $t05758257822._7
1540- let shopLandOwner = $t05758257822._8
1541- let shopWhSave = $t05758257822._9
1542- let accStatsResult = $t05758257822._10
1514+ let $t05698857228 = acceptShopOrderCommon(shopLandAssetId, callerAddr, bpOrderStr, bpResList, bpMatList, bpProdList)
1515+ let shopAction = $t05698857228._1
1516+ let newUserRes = $t05698857228._2
1517+ let newUserMat = $t05698857228._3
1518+ let newUserProd = $t05698857228._4
1519+ let usdWh2BpSaldo = $t05698857228._5
1520+ let usdBp2WhSaldo = $t05698857228._6
1521+ let xpAmount = $t05698857228._7
1522+ let shopLandOwner = $t05698857228._8
1523+ let shopWhSave = $t05698857228._9
1524+ let accStatsResult = $t05698857228._10
15431525 let actions1 = [shopAction, shop2userActions(usdWh2BpSaldo, callerAddr, 0)]
15441526 let actions2 = user2shopActions(usdBp2WhSaldo, i.payments, shopLandOwner, 0)
15451527 let newBpStr = makeString_2C([currentPack[bpIdxLevel], makeString(newUserRes, "_"), makeString(newUserMat, "_"), makeString_2C(newUserProd, "_")], ":")
15541536
15551537
15561538 @Callable(i)
1557-func acceptShopOrderDuckDelivery (orderStr,shopLandAssetId) = if (!(KS_ALLOW_DELIVERY))
1558- then throw("Delivery feature is turned off!")
1559- else {
1560- let prologResult = prolog()
1561- if ((prologResult == prologResult))
1562- then {
1563- let caller = i.originCaller
1564- let callerAddr = toString(caller)
1565- let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(callerAddr)), "You don't have a duck staked")
1566- let bpKey = keyBackpackByDuck(duckAssetId)
1567- let currentPack = getBackpack(bpKey)
1568- let bpResList = split(currentPack[bpIdxRes], "_")
1569- let bpMatList = split(currentPack[bpIdxMat], "_")
1570- let bpProdList = if ((currentPack[bpIdxProd] == ""))
1571- then nil
1572- else split_4C(currentPack[bpIdxProd], "_")
1573- let $t05926459502 = acceptShopOrderCommon(shopLandAssetId, callerAddr, orderStr, bpResList, bpMatList, bpProdList)
1574- let shopAction = $t05926459502._1
1575- let newUserRes = $t05926459502._2
1576- let newUserMat = $t05926459502._3
1577- let newUserProd = $t05926459502._4
1578- let usdWh2BpSaldo = $t05926459502._5
1579- let usdBp2WhSaldo = $t05926459502._6
1580- let xpAmount = $t05926459502._7
1581- let shopLandOwner = $t05926459502._8
1582- let shopWhSave = $t05926459502._9
1583- let accStatsResult = $t05926459502._10
1584- let deliveryFeePart = fraction((usdBp2WhSaldo + usdWh2BpSaldo), DELIVERY_FEE, MULT6)
1585- let deliveryFee = max([deliveryFeePart, MIN_USDT_FEE_DELIVERY])
1586- let spentFee = fraction(deliveryFee, usdBp2WhSaldo, (usdBp2WhSaldo + usdWh2BpSaldo))
1587- let receivedFee = (deliveryFee - spentFee)
1588- let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1589- let actions1 = [shopAction, shop2userActions(usdWh2BpSaldo, callerAddr, receivedFee)]
1590- let actions2 = user2shopActions(usdBp2WhSaldo, i.payments, shopLandOwner, spentFee)
1591- let newBpStr = makeString_2C([currentPack[bpIdxLevel], makeString(newUserRes, "_"), makeString(newUserMat, "_"), makeString_2C(newUserProd, "_")], ":")
1592- let bpSave = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil))
1593- let duckStatsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpShop, xpAmount, MULT8)], nil))
1594- $Tuple2(((actions1 ++ actions2) :+ IntegerEntry(deliveryFundKey, (fundTotal + deliveryFee))), $Tuple5(prologResult, shopWhSave, bpSave, duckStatsResult, accStatsResult))
1595- }
1596- else throw("Strict value is not equal to itself.")
1597- }
1539+func acceptShopOrderDuckDelivery (orderStr,shopLandAssetId) = {
1540+ let prologResult = prolog()
1541+ if ((prologResult == prologResult))
1542+ then {
1543+ let caller = i.originCaller
1544+ let callerAddr = toString(caller)
1545+ let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(callerAddr)), "You don't have a duck staked")
1546+ let bpKey = keyBackpackByDuck(duckAssetId)
1547+ let currentPack = getBackpack(bpKey)
1548+ let bpResList = split(currentPack[bpIdxRes], "_")
1549+ let bpMatList = split(currentPack[bpIdxMat], "_")
1550+ let bpProdList = if ((currentPack[bpIdxProd] == ""))
1551+ then nil
1552+ else split_4C(currentPack[bpIdxProd], "_")
1553+ let $t05859358831 = acceptShopOrderCommon(shopLandAssetId, callerAddr, orderStr, bpResList, bpMatList, bpProdList)
1554+ let shopAction = $t05859358831._1
1555+ let newUserRes = $t05859358831._2
1556+ let newUserMat = $t05859358831._3
1557+ let newUserProd = $t05859358831._4
1558+ let usdWh2BpSaldo = $t05859358831._5
1559+ let usdBp2WhSaldo = $t05859358831._6
1560+ let xpAmount = $t05859358831._7
1561+ let shopLandOwner = $t05859358831._8
1562+ let shopWhSave = $t05859358831._9
1563+ let accStatsResult = $t05859358831._10
1564+ let deliveryFeePart = fraction((usdBp2WhSaldo + usdWh2BpSaldo), DELIVERY_FEE, MULT6)
1565+ let deliveryFee = max([deliveryFeePart, MIN_USDT_FEE_DELIVERY])
1566+ let spentFee = fraction(deliveryFee, usdBp2WhSaldo, (usdBp2WhSaldo + usdWh2BpSaldo))
1567+ let receivedFee = (deliveryFee - spentFee)
1568+ let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1569+ let actions1 = [shopAction, shop2userActions(usdWh2BpSaldo, callerAddr, receivedFee)]
1570+ let actions2 = user2shopActions(usdBp2WhSaldo, i.payments, shopLandOwner, spentFee)
1571+ let newBpStr = makeString_2C([currentPack[bpIdxLevel], makeString(newUserRes, "_"), makeString(newUserMat, "_"), makeString_2C(newUserProd, "_")], ":")
1572+ let bpSave = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil))
1573+ let duckStatsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpShop, xpAmount, MULT8)], nil))
1574+ $Tuple2(((actions1 ++ actions2) :+ IntegerEntry(deliveryFundKey, (fundTotal + deliveryFee))), $Tuple5(prologResult, shopWhSave, bpSave, duckStatsResult, accStatsResult))
1575+ }
1576+ else throw("Strict value is not equal to itself.")
1577+ }
15981578
15991579
16001580
16011581 @Callable(i)
1602-func acceptShopOrderLandDelivery (orderStr,shopLandAssetId,myLandAssetId) = if (!(KS_ALLOW_DELIVERY))
1603- then throw("Delivery feature is turned off!")
1604- else {
1605- let prologResult = prolog()
1606- if ((prologResult == prologResult))
1607- then {
1608- let caller = i.originCaller
1609- let callerAddr = toString(caller)
1610- let asset = value(assetInfo(fromBase58String(myLandAssetId)))
1611- if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(myLandAssetId)))))
1612- then throw((("NFT " + asset.name) + " is not staked"))
1613- else {
1614- let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(myLandAssetId)), (("NFT " + asset.name) + " is orphaned"))
1615- if ((owner != callerAddr))
1616- then throw((LANDPREFIX + " is not yours"))
1617- else {
1618- let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [myLandAssetId], nil))
1619- let currentWh = split_4C(wh, ":")
1620- let resList = split(currentWh[whIdxRes], "_")
1621- let matList = split(currentWh[whIdxMat], "_")
1622- let prodList = if ((currentWh[whIdxProd] == ""))
1623- then nil
1624- else split_4C(currentWh[whIdxProd], "_")
1625- let $t06170061932 = acceptShopOrderCommon(shopLandAssetId, callerAddr, orderStr, resList, matList, prodList)
1626- let shopAction = $t06170061932._1
1627- let newUserRes = $t06170061932._2
1628- let newUserMat = $t06170061932._3
1629- let newUserProd = $t06170061932._4
1630- let usdWh2BpSaldo = $t06170061932._5
1631- let usdBp2WhSaldo = $t06170061932._6
1632- let xpAmount = $t06170061932._7
1633- let shopLandOwner = $t06170061932._8
1634- let shopWhSave = $t06170061932._9
1635- let accStatsResult = $t06170061932._10
1636- let deliveryFeePart = fraction((usdBp2WhSaldo + usdWh2BpSaldo), DELIVERY_FEE, MULT6)
1637- let deliveryFee = max([deliveryFeePart, MIN_USDT_FEE_DELIVERY])
1638- let spentFee = fraction(deliveryFee, usdBp2WhSaldo, (usdBp2WhSaldo + usdWh2BpSaldo))
1639- let receivedFee = (deliveryFee - spentFee)
1640- let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1641- let actions1 = [shopAction, shop2userActions(usdWh2BpSaldo, callerAddr, receivedFee)]
1642- let actions2 = user2shopActions(usdBp2WhSaldo, i.payments, shopLandOwner, spentFee)
1643- let whStr = makeString_2C([currentWh[whIdxLevels], makeString(newUserRes, "_"), makeString(newUserMat, "_"), makeString(newUserProd, "_"), currentWh[whIdxLOFT]], ":")
1644- let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, myLandAssetId], nil))
1645- let statsResult = asInt(invoke(stakingContract, "updateAccStats", [callerAddr, fraction(xpShop, xpAmount, MULT8)], nil))
1646- $Tuple2(((actions1 ++ actions2) :+ IntegerEntry(deliveryFundKey, (fundTotal + deliveryFee))), $Tuple5(prologResult, shopWhSave, whSave, statsResult, accStatsResult))
1647- }
1648- }
1649- }
1650- else throw("Strict value is not equal to itself.")
1651- }
1582+func acceptShopOrderLandDelivery (orderStr,shopLandAssetId,myLandAssetId) = {
1583+ let prologResult = prolog()
1584+ if ((prologResult == prologResult))
1585+ then {
1586+ let caller = i.originCaller
1587+ let callerAddr = toString(caller)
1588+ let asset = value(assetInfo(fromBase58String(myLandAssetId)))
1589+ if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(myLandAssetId)))))
1590+ then throw((("NFT " + asset.name) + " is not staked"))
1591+ else {
1592+ let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(myLandAssetId)), (("NFT " + asset.name) + " is orphaned"))
1593+ if ((owner != callerAddr))
1594+ then throw((LANDPREFIX + " is not yours"))
1595+ else {
1596+ let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [myLandAssetId], nil))
1597+ let currentWh = split_4C(wh, ":")
1598+ let resList = split(currentWh[whIdxRes], "_")
1599+ let matList = split(currentWh[whIdxMat], "_")
1600+ let prodList = if ((currentWh[whIdxProd] == ""))
1601+ then nil
1602+ else split_4C(currentWh[whIdxProd], "_")
1603+ let $t06095261184 = acceptShopOrderCommon(shopLandAssetId, callerAddr, orderStr, resList, matList, prodList)
1604+ let shopAction = $t06095261184._1
1605+ let newUserRes = $t06095261184._2
1606+ let newUserMat = $t06095261184._3
1607+ let newUserProd = $t06095261184._4
1608+ let usdWh2BpSaldo = $t06095261184._5
1609+ let usdBp2WhSaldo = $t06095261184._6
1610+ let xpAmount = $t06095261184._7
1611+ let shopLandOwner = $t06095261184._8
1612+ let shopWhSave = $t06095261184._9
1613+ let accStatsResult = $t06095261184._10
1614+ let deliveryFeePart = fraction((usdBp2WhSaldo + usdWh2BpSaldo), DELIVERY_FEE, MULT6)
1615+ let deliveryFee = max([deliveryFeePart, MIN_USDT_FEE_DELIVERY])
1616+ let spentFee = fraction(deliveryFee, usdBp2WhSaldo, (usdBp2WhSaldo + usdWh2BpSaldo))
1617+ let receivedFee = (deliveryFee - spentFee)
1618+ let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1619+ let actions1 = [shopAction, shop2userActions(usdWh2BpSaldo, callerAddr, receivedFee)]
1620+ let actions2 = user2shopActions(usdBp2WhSaldo, i.payments, shopLandOwner, spentFee)
1621+ let whStr = makeString_2C([currentWh[whIdxLevels], makeString(newUserRes, "_"), makeString(newUserMat, "_"), makeString(newUserProd, "_"), currentWh[whIdxLOFT]], ":")
1622+ let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, myLandAssetId], nil))
1623+ let statsResult = asInt(invoke(stakingContract, "updateAccStats", [callerAddr, fraction(xpShop, xpAmount, MULT8)], nil))
1624+ $Tuple2(((actions1 ++ actions2) :+ IntegerEntry(deliveryFundKey, (fundTotal + deliveryFee))), $Tuple5(prologResult, shopWhSave, whSave, statsResult, accStatsResult))
1625+ }
1626+ }
1627+ }
1628+ else throw("Strict value is not equal to itself.")
1629+ }
16521630
16531631
16541632
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let xpTrade = 10000
55
66 let xpCraft = 10000
77
88 let xpSellToEs = 10000
99
1010 let xpShop = 10000
1111
1212 let LANDPREFIX = "LAND"
1313
1414 let NUMRES = 6
1515
1616 let DEFAULTLOCATION = "Africa_F_Africa"
1717
1818 let RESOURCEPRICEMIN = 39637
1919
2020 let ESMAXPACKAGES = 10
2121
2222 let ESBUYCOEF = 4
2323
2424 let MIN_USDT_FEE_DELIVERY = 50000
2525
2626 let MIN_USDT_FEE_DELIVERY15 = 75000
2727
2828 let CRAFT_USDT_COST = 1000000
2929
3030 let CRAFT_DELIVERY_COEFF = 10
3131
3232 let USDT2ACRES_MULTIPLIER = 10
3333
3434 let resTypes = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"]
3535
3636 let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"]
3737
3838 let prodTypes = ["First Aid Kit L1", "First Aid Kit L2", "First Aid Kit L3", "Backpack L1", "Backpack L2", "Backpack L3", "Food Ration L1", "Food Ration L2", "Food Ration L3", "Jet Pack L1", "Jet Pack L2", "Jet Pack L3", "Shield L1", "Shield L2", "Shield L3", "Mine L1", "Mine L2", "Mine L3", "Trap L1", "Trap L2", "Trap L3"]
3939
4040 let continents = ["Americas", "Europe", "Asia", "Africa", "Oceania"]
4141
4242 let COEFF2MAT = 10000000
4343
4444 let productionMatrix = ["8_8_8_17_17_42_12_0_30_0,0,0,0,0,0,0_", "8_8_8_17_17_42_24_0_60_0,0,5,2,0,0,0_", "8_8_8_17_17_42_36_0_120_0,0,10,4,0,0,0_", "8_19_19_8_27_19_26_1_20_0,0,0,0,0,0,0_001", "8_19_19_8_27_19_52_1_40_0,0,0,0,0,0,0_001", "8_19_19_8_27_19_78_1_80_0,0,0,0,0,0,0_001", "8_8_8_8_8_60_13_2_2_0,0,0,0,0,0,0_011", "8_8_8_8_8_60_26_2_4_0,0,0,0,0,0,0_011", "8_8_8_8_8_60_39_2_8_0,0,0,0,0,0,0_011", "30_30_3_17_17_3_30_3_30_0,0,0,0,0,0,0_111", "30_30_3_17_17_3_60_3_50_0,0,0,0,0,0,0_111", "30_30_3_17_17_3_90_3_70_0,0,0,0,0,0,0_111", "18_18_10_18_18_18_11_4_10_0,0,0,0,0,0,0_201", "18_18_10_18_18_18_22_4_20_0,0,0,0,0,0,0_201", "18_18_10_18_18_18_33_4_30_0,0,0,0,0,0,0_201", "4_13_22_4_35_22_23_0_50,1,0_0,0,0,0,0,0,0_", "4_13_22_4_35_22_46_0_50,1,1_0,2,5,0,0,0,0_", "4_13_22_4_35_22_69_0_50,2,1_0,5,10,0,0,0,0_", "5_25_40_5_10_15_20_1_30,1,1_0,0,0,0,0,0,0_", "5_25_40_5_10_15_40_1_30,1,2_2,1,3,0,0,0,0_", "5_25_40_5_10_15_60_1_30,1,3_5,2,8,0,0,0,0_"]
4545
4646 let rIdxCoeff = 6
4747
4848 let rIdxContinent = 7
4949
5050 let RECIPESIZE = 11
5151
5252 let PRODUCTPKGSIZE = 10
5353
5454 let whIdxLevels = 0
5555
5656 let whIdxRes = 1
5757
5858 let whIdxMat = 2
5959
6060 let whIdxProd = 3
6161
6262 let whIdxLOFT = 4
6363
6464 let volLocked = 0
6565
6666 let volTotal = 3
6767
6868 let bpIdxLevel = 0
6969
7070 let bpIdxRes = 1
7171
7272 let bpIdxMat = 2
7373
7474 let bpIdxProd = 3
7575
7676 let locIdxContinent = 0
7777
7878 let locIdxType = 1
7979
8080 let locIdxId = 2
8181
8282 func keyLandAssetIdToOwner (assetId) = ("no_" + assetId)
8383
8484
8585 func keyStakedTimeByAssetId (assetId) = ("st_" + assetId)
8686
8787
8888 func keyAddressRefBy (addr) = ("accRefBy_" + addr)
8989
9090
9191 func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr)
9292
9393
9494 func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId)
9595
9696
9797 func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId)
9898
9999
100100 func keyOrderByLand (landAssetId) = ("landOrder_" + landAssetId)
101101
102102
103103 func keyEsWarehouse () = "emergencyWarehouseProducts"
104104
105105
106106 let deliveryFundKey = "deliveryFund"
107107
108108 let deliveryLockedKey = "deliveryLocked"
109109
110110 func getRecipeMaterials (recipe) = (parseIntValue(recipe[rIdxCoeff]) * COEFF2MAT)
111111
112-
113-let KS_ALLOW_DELIVERY = true
114112
115113 let chain = take(drop(this.bytes, 1), 1)
116114
117115 let usdtAssetId = match chain {
118116 case _ =>
119117 if ((base58'2W' == $match0))
120118 then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi'
121119 else if ((base58'2T' == $match0))
122120 then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63'
123121 else throw("Unknown chain")
124122 }
125123
126124 let defaultRestAddressStr = match chain {
127125 case _ =>
128126 if ((base58'2W' == $match0))
129127 then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
130128 else if ((base58'2T' == $match0))
131129 then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
132130 else throw("Unknown chain")
133131 }
134132
135133 let SEP = "__"
136134
137135 let MULT5 = 100000
138136
139137 let MULT6 = 1000000
140138
141139 let MULT8 = 100000000
142140
143141 let MULT10 = 10000000000
144142
145143 let MINSHOPPAYMENT = 100000
146144
147145 let ITER6 = [0, 1, 2, 3, 4, 5]
148146
149147 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
150148
151149
152150 let IdxCfgStakingDapp = 1
153151
154152 let IdxCfgInvestFundDapp = 6
155153
156154 let IdxCfgAcresDapp = 8
157155
158156 func keyRestCfg () = "%s__restConfig"
159157
160158
161159 func keyRestAddress () = "%s__restAddr"
162160
163161
164162 func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP)
165163
166164
167165 func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
168166
169167
170168 let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr))
171169
172170 let restCfg = readRestCfgOrFail(restContract)
173171
174172 let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp)
175173
176174 let investFundContract = getContractAddressOrFail(restCfg, IdxCfgInvestFundDapp)
177175
178176 let acresContract = getContractAddressOrFail(restCfg, IdxCfgAcresDapp)
179177
180178 func asString (v) = match v {
181179 case s: String =>
182180 s
183181 case _ =>
184182 throw("fail to cast into String")
185183 }
186184
187185
188186 func asInt (v) = match v {
189187 case n: Int =>
190188 n
191189 case _ =>
192190 throw("fail to cast into Int")
193191 }
194192
195193
196194 func keyBlocked () = "contractsBlocked"
197195
198196
199197 func fixedPoint (val,decimals) = {
200198 let tenPow = pow(10, 0, decimals, 0, 0, DOWN)
201199 let lowPart = toString((val % tenPow))
202200 let zeroes = drop(toString(tenPow), (1 + size(lowPart)))
203201 (((toString((val / tenPow)) + ".") + zeroes) + lowPart)
204202 }
205203
206204
207205 let FACTORYMAXWAREHOUSE = 10000000000
208206
209207 let SELLMULTIPLIER = 200
210208
211209 let BUYMULTIPLIER = 300
212210
213211 let AUCTIONFEE = 10000
214212
215213 let DELIVERY_FEE = 10000
216214
217215 let DELIVERY_FEE15 = 15000
218216
219217 func keyFactoryWarehouseByIdAndType (factoryId,resType) = ((("factoryWhByContinentAndRes_" + factoryId) + "_") + toString(resType))
220218
221219
222220 let ordIdxRes = 0
223221
224222 let ordIdxMat = 1
225223
226224 let ordIdxProd = 2
227225
228226 func getOrder (ordKey) = {
229227 let p = split(valueOrElse(getString(ordKey), "0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:"), ":")
230228 [if ((size(split(p[ordIdxRes], "_")) == NUMRES))
231229 then p[ordIdxRes]
232230 else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split(p[ordIdxMat], "_")) == NUMRES))
233231 then p[ordIdxMat]
234232 else "0@0_0@0_0@0_0@0_0@0_0@0", p[ordIdxProd]]
235233 }
236234
237235
238236 func toVolume (amount,pkgSize,isProduct) = if (isProduct)
239237 then {
240238 let pkgs = if ((amount >= 0))
241239 then (((amount + pkgSize) - 1) / pkgSize)
242240 else -((((-(amount) + pkgSize) - 1) / pkgSize))
243241 (pkgs * MULT8)
244242 }
245243 else amount
246244
247245
248246 func sellInternal (locId,resType,amount,minPrice) = {
249247 let whKey = keyFactoryWarehouseByIdAndType(locId, resType)
250248 let w0 = valueOrElse(getInteger(whKey), 0)
251249 let r0 = if ((w0 > FACTORYMAXWAREHOUSE))
252250 then 0
253251 else if (((w0 + amount) > FACTORYMAXWAREHOUSE))
254252 then (FACTORYMAXWAREHOUSE - w0)
255253 else amount
256254 let usdtReceived = (fraction(r0, ((SELLMULTIPLIER * RESOURCEPRICEMIN) - fraction(((100 * w0) + (50 * r0)), RESOURCEPRICEMIN, FACTORYMAXWAREHOUSE)), MULT10) + fraction((amount - r0), RESOURCEPRICEMIN, MULT8))
257255 let min99 = (minPrice - (minPrice / 100))
258256 if (((min99 * amount) > (usdtReceived * MULT8)))
259257 then throw((((((((((("Actual price = " + toString(usdtReceived)) + " / ") + toString(amount)) + " < minPrice = ") + toString(minPrice)) + ", (") + locId) + ", ") + resTypes[resType]) + ")"))
260258 else $Tuple2(IntegerEntry(whKey, (w0 + amount)), usdtReceived)
261259 }
262260
263261
264262 func buyInternal (locId,matType,amount,maxPrice) = {
265263 let whKey = keyFactoryWarehouseByIdAndType(locId, matType)
266264 let w0 = valueOrElse(getInteger(whKey), 0)
267265 let m1 = if ((w0 > FACTORYMAXWAREHOUSE))
268266 then min([amount, (w0 - FACTORYMAXWAREHOUSE)])
269267 else 0
270268 let m0 = min([w0, (amount - m1)])
271269 let m = (m0 + m1)
272270 let w0min = min([w0, FACTORYMAXWAREHOUSE])
273271 let usdtSpent = (fraction(m0, ((BUYMULTIPLIER * RESOURCEPRICEMIN) - fraction(((100 * w0min) - (50 * m0)), RESOURCEPRICEMIN, FACTORYMAXWAREHOUSE)), MULT10) + fraction(m1, (2 * RESOURCEPRICEMIN), MULT8))
274272 let max101 = (maxPrice + (maxPrice / 100))
275273 if (((usdtSpent * MULT8) > (max101 * m)))
276274 then throw((((((((((("Actual price = " + toString(usdtSpent)) + " / ") + toString(m)) + " > maxPrice = ") + toString(maxPrice)) + ", (") + locId) + ", ") + matTypes[matType]) + ")"))
277275 else $Tuple3(IntegerEntry(whKey, (w0 - m)), usdtSpent, m)
278276 }
279277
280278
281279 func getBackpack (bpKey) = {
282280 let p = split_4C(valueOrElse(getString(stakingContract, bpKey), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":")
283281 [toString(valueOrElse(parseInt(p[bpIdxLevel]), 0)), if ((size(split(p[bpIdxRes], "_")) == NUMRES))
284282 then p[bpIdxRes]
285283 else "0_0_0_0_0_0", if ((size(split(p[bpIdxMat], "_")) == NUMRES))
286284 then p[bpIdxMat]
287285 else "0_0_0_0_0_0", p[bpIdxProd]]
288286 }
289287
290288
291289 func checkBlocked () = if (valueOrElse(getBoolean(stakingContract, keyBlocked()), false))
292290 then throw("Contracts are under maintenance")
293291 else unit
294292
295293
296294 func prolog () = asInt(reentrantInvoke(stakingContract, "saveLastTx", nil, nil))
297295
298296
299297 func setCommon (acc,ignoredIterator) = {
300298 let j = acc._1
301299 let item = if ((size(acc._10) > j))
302300 then acc._10[j]
303301 else "0@0"
304302 let isProd = acc._8
305303 let itemParts = split(item, "@")
306304 if ((size(itemParts) != 2))
307305 then throw("Incorrect order format, should be amount@price")
308306 else {
309307 let newOrdAm = parseIntValue(itemParts[0])
310308 let newOrdPr = parseIntValue(itemParts[1])
311309 let newOrdUsd = if (isProd)
312310 then (newOrdAm * newOrdPr)
313311 else fraction(newOrdAm, newOrdPr, MULT8)
314312 let newOrdVol = toVolume(newOrdAm, PRODUCTPKGSIZE, isProd)
315313 let whInit = if ((size(acc._6) > j))
316314 then parseIntValue(acc._6[j])
317315 else 0
318316 let curOrdParts = split(if ((size(acc._7) > j))
319317 then acc._7[j]
320318 else "0@0", "@")
321319 let curOrdAm = parseIntValue(curOrdParts[0])
322320 let curOrdPr = parseIntValue(curOrdParts[1])
323321 if (if ((0 > curOrdPr))
324322 then true
325323 else (0 > newOrdPr))
326324 then throw("Price can't be negative")
327325 else {
328326 let curOrdUsd = if (isProd)
329327 then (curOrdAm * curOrdPr)
330328 else fraction(curOrdAm, curOrdPr, MULT8)
331329 if ((newOrdAm == 0))
332330 then if ((curOrdAm > 0))
333331 then $Tuple10((j + 1), (acc._2 :+ toString(whInit)), acc._3, acc._4, (acc._5 - curOrdUsd), acc._6, acc._7, isProd, (acc._9 + toVolume(whInit, PRODUCTPKGSIZE, isProd)), acc._10)
334332 else $Tuple10((j + 1), (acc._2 :+ toString((whInit - curOrdAm))), acc._3, acc._4, acc._5, acc._6, acc._7, isProd, (acc._9 + toVolume((whInit - curOrdAm), PRODUCTPKGSIZE, isProd)), acc._10)
335333 else if ((newOrdAm > 0))
336334 then if ((0 > curOrdAm))
337335 then $Tuple10((j + 1), (acc._2 :+ toString((whInit - curOrdAm))), (acc._3 + newOrdVol), acc._4, (acc._5 + newOrdUsd), acc._6, acc._7, isProd, toVolume((whInit - curOrdAm), PRODUCTPKGSIZE, isProd), acc._10)
338336 else $Tuple10((j + 1), (acc._2 :+ toString(whInit)), (acc._3 + newOrdVol), acc._4, ((acc._5 + newOrdUsd) - curOrdUsd), acc._6, acc._7, isProd, toVolume(whInit, PRODUCTPKGSIZE, isProd), acc._10)
339337 else if ((0 > curOrdAm))
340338 then {
341339 let amDiff = (curOrdAm - newOrdAm)
342340 if ((0 > (whInit - amDiff)))
343341 then throw((((("Attempt to take " + toString(amDiff)) + " from warehouse, but only ") + toString(whInit)) + " available"))
344342 else $Tuple10((j + 1), (acc._2 :+ toString((whInit - amDiff))), acc._3, (acc._4 - newOrdVol), acc._5, acc._6, acc._7, isProd, toVolume((whInit - amDiff), PRODUCTPKGSIZE, isProd), acc._10)
345343 }
346344 else if ((0 > (whInit + newOrdAm)))
347345 then throw((((("Attempt to take " + toString(-(newOrdAm))) + " from warehouse, but only ") + toString(whInit)) + " available"))
348346 else $Tuple10((j + 1), (acc._2 :+ toString((whInit + newOrdAm))), acc._3, (acc._4 - newOrdVol), (acc._5 - curOrdUsd), acc._6, acc._7, isProd, toVolume((whInit + newOrdAm), PRODUCTPKGSIZE, isProd), acc._10)
349347 }
350348 }
351349 }
352350
353351
354352 func setInternal (currentWh,currentOrd,newOrd) = {
355353 let currWhRes = split(currentWh[whIdxRes], "_")
356354 let currWhMat = split(currentWh[whIdxMat], "_")
357355 let currWhProd = if ((currentWh[whIdxProd] == ""))
358356 then nil
359357 else split_4C(currentWh[whIdxProd], "_")
360358 let currentOrdRes = split(currentOrd[ordIdxRes], "_")
361359 let currentOrdMat = split(currentOrd[ordIdxMat], "_")
362360 let currentOrdProd = if ((currentOrd[ordIdxProd] == ""))
363361 then nil
364362 else split_4C(currentOrd[ordIdxProd], "_")
365363 if ((size(newOrd) != 3))
366364 then throw("newOrderStr should contain exactly 2 ':' separators")
367365 else {
368366 let resParts = split(newOrd[0], "_")
369367 let matParts = split(newOrd[1], "_")
370368 let prodParts = if ((newOrd[2] == ""))
371369 then nil
372370 else split_4C(newOrd[2], "_")
373371 if ((size(resParts) != NUMRES))
374372 then throw("All 6 resources should be passed")
375373 else if ((size(matParts) != NUMRES))
376374 then throw("All 6 materials should be passed")
377375 else {
378376 let r = {
379377 let $l = resTypes
380378 let $s = size($l)
381379 let $acc0 = $Tuple10(0, nil, 0, 0, 0, currWhRes, currentOrdRes, false, 0, resParts)
382380 func $f0_1 ($a,$i) = if (($i >= $s))
383381 then $a
384382 else setCommon($a, $l[$i])
385383
386384 func $f0_2 ($a,$i) = if (($i >= $s))
387385 then $a
388386 else throw("List size exceeds 6")
389387
390388 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
391389 }
392390 let m = {
393391 let $l = matTypes
394392 let $s = size($l)
395393 let $acc0 = $Tuple10(0, nil, r._3, r._4, r._5, currWhMat, currentOrdMat, false, r._9, matParts)
396394 func $f1_1 ($a,$i) = if (($i >= $s))
397395 then $a
398396 else setCommon($a, $l[$i])
399397
400398 func $f1_2 ($a,$i) = if (($i >= $s))
401399 then $a
402400 else throw("List size exceeds 6")
403401
404402 $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6)
405403 }
406404 let p = {
407405 let $l = prodTypes
408406 let $s = size($l)
409407 let $acc0 = $Tuple10(0, nil, m._3, m._4, m._5, currWhProd, currentOrdProd, true, m._9, prodParts)
410408 func $f2_1 ($a,$i) = if (($i >= $s))
411409 then $a
412410 else setCommon($a, $l[$i])
413411
414412 func $f2_2 ($a,$i) = if (($i >= $s))
415413 then $a
416414 else throw("List size exceeds 50")
417415
418416 $f2_2($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50)
419417 }
420418 $Tuple7(r._2, m._2, p._2, p._3, p._4, p._5, p._9)
421419 }
422420 }
423421 }
424422
425423
426424 func acceptCommon (acc,bpOrdItem) = {
427425 let j = acc._7
428426 let isProd = acc._12
429427 let bpOrdParts = split(bpOrdItem, "@")
430428 if ((size(bpOrdParts) != 2))
431429 then throw("Incorrect order format, should be amount@price")
432430 else {
433431 let bpOrdAm = parseIntValue(bpOrdParts[0])
434432 let bpOrdPr = parseIntValue(bpOrdParts[1])
435433 if ((0 > bpOrdPr))
436434 then throw("Price can't be negative")
437435 else {
438436 let bpOrdUsd = if (isProd)
439437 then (bpOrdAm * bpOrdPr)
440438 else fraction(bpOrdAm, bpOrdPr, MULT8)
441439 let bpInit = if ((size(acc._8) > j))
442440 then parseIntValue(acc._8[j])
443441 else 0
444442 let whInit = if ((size(acc._9) > j))
445443 then parseIntValue(acc._9[j])
446444 else 0
447445 let whOrdInit = if ((size(acc._10) > j))
448446 then acc._10[j]
449447 else "0@0"
450448 let whOrdParts = split(whOrdInit, "@")
451449 let whOrdAm = parseIntValue(whOrdParts[0])
452450 let whOrdPr = parseIntValue(whOrdParts[1])
453451 if (if ((bpOrdAm != 0))
454452 then (bpOrdPr != whOrdPr)
455453 else false)
456454 then throw(((((("Prices of " + acc._11[j]) + " don't match! WH price=") + toString(whOrdPr)) + ", your price=") + toString(bpOrdPr)))
457455 else {
458456 let whOrdUsd = if (isProd)
459457 then (whOrdAm * whOrdPr)
460458 else fraction(whOrdAm, whOrdPr, MULT8)
461459 let deltaVol = toVolume(bpOrdAm, PRODUCTPKGSIZE, isProd)
462460 if ((bpOrdAm == 0))
463461 then $Tuple13((acc._1 :+ toString(whInit)), (acc._2 :+ whOrdInit), (acc._3 :+ toString(bpInit)), acc._4, acc._5, acc._6, (acc._7 + 1), acc._8, acc._9, acc._10, acc._11, isProd, acc._13)
464462 else if ((bpOrdAm > 0))
465463 then if ((0 > whOrdAm))
466464 then if ((bpOrdAm > -(whOrdAm)))
467465 then throw(((((("Attempt to buy " + toString(bpOrdAm)) + " of ") + acc._11[j]) + ", but warehouse only sells ") + toString(-(whOrdAm))))
468466 else $Tuple13((acc._1 :+ toString(whInit)), (acc._2 :+ ((toString((whOrdAm + bpOrdAm)) + "@") + toString(whOrdPr))), (acc._3 :+ toString((bpInit + bpOrdAm))), (acc._4 + deltaVol), acc._5, (acc._6 + bpOrdUsd), (acc._7 + 1), acc._8, acc._9, acc._10, acc._11, isProd, (acc._13 + (if (isProd)
469467 then (bpOrdAm * MULT8)
470468 else bpOrdAm)))
471469 else throw((("Attempt to buy " + acc._11[j]) + " while warehouse doesn't sell it"))
472470 else if ((whOrdAm > 0))
473471 then if ((-(bpOrdAm) > whOrdAm))
474472 then throw(((((("Attempt to sell " + toString(-(bpOrdAm))) + " of ") + acc._11[j]) + ", but warehouse only buys ") + toString(whOrdAm)))
475473 else if ((-(bpOrdAm) > bpInit))
476474 then throw(((((("Attempt to sell " + toString(-(bpOrdAm))) + ", but you only have ") + toString(bpInit)) + " of ") + acc._11[j]))
477475 else $Tuple13((acc._1 :+ toString((whInit - bpOrdAm))), (acc._2 :+ ((toString((whOrdAm + bpOrdAm)) + "@") + toString(whOrdPr))), (acc._3 :+ toString((bpInit + bpOrdAm))), (acc._4 - deltaVol), (acc._5 - bpOrdUsd), acc._6, (acc._7 + 1), acc._8, acc._9, acc._10, acc._11, isProd, (acc._13 - (if (isProd)
478476 then (bpOrdAm * MULT8)
479477 else bpOrdAm)))
480478 else throw((("Attempt to sell " + acc._11[j]) + " while warehouse doesn't buy it"))
481479 }
482480 }
483481 }
484482 }
485483
486484
487485 func sellResourcesCommon (resList,factoryLocId,amounts,minPrices) = {
488486 func adder (acc,j) = if ((amounts[j] > parseIntValue(resList[j])))
489487 then throw(((((("You have " + resList[j]) + " of ") + resTypes[j]) + ", but tried to sell ") + toString(amounts[j])))
490488 else if ((0 > amounts[j]))
491489 then throw(((("You tried to sell negative amount of " + resTypes[j]) + ": ") + toString(amounts[j])))
492490 else if ((amounts[j] > 0))
493491 then {
494492 let b = sellInternal(factoryLocId, j, amounts[j], minPrices[j])
495493 $Tuple4((acc._1 :+ b._1), (acc._2 :+ toString((parseIntValue(resList[j]) - amounts[j]))), (acc._3 + b._2), (acc._4 + amounts[j]))
496494 }
497495 else $Tuple4(acc._1, (acc._2 :+ resList[j]), acc._3, acc._4)
498496
499497 let $l = ITER6
500498 let $s = size($l)
501499 let $acc0 = $Tuple4(nil, nil, 0, 0)
502500 func $f0_1 ($a,$i) = if (($i >= $s))
503501 then $a
504502 else adder($a, $l[$i])
505503
506504 func $f0_2 ($a,$i) = if (($i >= $s))
507505 then $a
508506 else throw("List size exceeds 6")
509507
510508 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
511509 }
512510
513511
514512 func buyMaterialsCommon (matList,factoryLocId,amounts,maxPrices) = {
515513 func mUpdater (acc,j) = if ((0 > amounts[j]))
516514 then throw(((("You tried to buy negative amount of " + matTypes[j]) + ": ") + toString(amounts[j])))
517515 else if ((amounts[j] > 0))
518516 then {
519517 let b = buyInternal(factoryLocId, j, amounts[j], maxPrices[j])
520518 $Tuple4((acc._1 :+ b._1), (acc._2 :+ toString((parseIntValue(matList[j]) + b._3))), (acc._3 + b._2), (acc._4 + amounts[j]))
521519 }
522520 else $Tuple4(acc._1, (acc._2 :+ matList[j]), acc._3, acc._4)
523521
524522 let $l = ITER6
525523 let $s = size($l)
526524 let $acc0 = $Tuple4(nil, nil, 0, 0)
527525 func $f0_1 ($a,$i) = if (($i >= $s))
528526 then $a
529527 else mUpdater($a, $l[$i])
530528
531529 func $f0_2 ($a,$i) = if (($i >= $s))
532530 then $a
533531 else throw("List size exceeds 6")
534532
535533 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
536534 }
537535
538536
539537 func exchangeResourcesCommon (resList,matList,amounts) = {
540538 func exchanger (acc,j) = {
541539 let amj = amounts[j]
542540 if ((amj > parseIntValue(resList[j])))
543541 then throw(((((("You have " + resList[j]) + " of ") + resTypes[j]) + ", but tried to exchange ") + toString(amj)))
544542 else if ((0 > amj))
545543 then throw(((("You tried to exchange negative amount of " + resTypes[j]) + ": ") + toString(amj)))
546544 else if ((amj > 0))
547545 then $Tuple4((acc._1 :+ toString((parseIntValue(resList[j]) - amj))), (acc._2 :+ toString((parseIntValue(matList[j]) + amj))), (acc._3 + fraction(amj, RESOURCEPRICEMIN, MULT8)), (acc._4 + amj))
548546 else $Tuple4((acc._1 :+ resList[j]), (acc._2 :+ matList[j]), acc._3, acc._4)
549547 }
550548
551549 let $l = ITER6
552550 let $s = size($l)
553551 let $acc0 = $Tuple4(nil, nil, 0, 0)
554552 func $f0_1 ($a,$i) = if (($i >= $s))
555553 then $a
556554 else exchanger($a, $l[$i])
557555
558556 func $f0_2 ($a,$i) = if (($i >= $s))
559557 then $a
560558 else throw("List size exceeds 6")
561559
562560 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
563561 }
564562
565563
566564 func shop2userActions (usdWh2BpSaldo,callerAddr,receivedFee) = if ((usdWh2BpSaldo > 0))
567565 then {
568566 let usdWh2BpFee = fraction(usdWh2BpSaldo, AUCTIONFEE, MULT6)
569567 if ((receivedFee >= (usdWh2BpSaldo - (3 * usdWh2BpFee))))
570568 then throw(("This trade does not cover delivery cost of " + fixedPoint(receivedFee, 6)))
571569 else {
572570 let refByKey = keyAddressRefBy(callerAddr)
573571 let refBy = getString(stakingContract, refByKey)
574572 let caller = addressFromStringValue(callerAddr)
575573 (((if (isDefined(refBy))
576574 then [ScriptTransfer(addressFromStringValue(value(refBy)), usdWh2BpFee, usdtAssetId)]
577575 else nil) :+ ScriptTransfer(caller, ((usdWh2BpSaldo - (3 * usdWh2BpFee)) - receivedFee), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId))
578576 }
579577 }
580578 else nil
581579
582580
583581 func user2shopActions (usdBp2WhSaldo,pmts,shopLandOwner,spentFee) = if ((usdBp2WhSaldo > 0))
584582 then if ((size(pmts) != 1))
585583 then throw("exactly 1 payment must be attached")
586584 else {
587585 let pmt = pmts[0]
588586 let amt = pmt.amount
589587 if (if (!(isDefined(pmt.assetId)))
590588 then true
591589 else (value(pmt.assetId) != usdtAssetId))
592590 then throw("USDT payments only!")
593591 else {
594592 let usdtSpentWithFee = (usdBp2WhSaldo + spentFee)
595593 if ((amt != usdtSpentWithFee))
596594 then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(usdBp2WhSaldo, 6)) + "+") + fixedPoint(spentFee, 6)) + "(delivery fee)"))
597595 else if ((MINSHOPPAYMENT > usdBp2WhSaldo))
598596 then throw(("Min shop trade is " + fixedPoint(MINSHOPPAYMENT, 6)))
599597 else {
600598 let usdBp2WhFee = fraction(usdBp2WhSaldo, AUCTIONFEE, MULT6)
601599 let refByKey = keyAddressRefBy(shopLandOwner)
602600 let refBy = getString(stakingContract, refByKey)
603601 (((if (isDefined(refBy))
604602 then [ScriptTransfer(addressFromStringValue(value(refBy)), usdBp2WhFee, usdtAssetId)]
605603 else nil) :+ ScriptTransfer(addressFromStringValue(shopLandOwner), (usdBp2WhSaldo - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId))
606604 }
607605 }
608606 }
609607 else if ((size(pmts) != 0))
610608 then throw("No payments needed")
611609 else nil
612610
613611
614612 func acceptShopOrderCommon (shopLandAssetId,callerAddr,bpOrderStr,bpResList,bpMatList,bpProdList) = {
615613 let landAsset = value(assetInfo(fromBase58String(shopLandAssetId)))
616614 if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(shopLandAssetId)))))
617615 then throw((("NFT " + landAsset.name) + " is not staked"))
618616 else {
619617 let shopLandOwner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(shopLandAssetId)), (("NFT " + landAsset.name) + " is orphaned"))
620618 if ((shopLandOwner == callerAddr))
621619 then throw("You cannot trade with yourself")
622620 else {
623621 let bpOrderParts = split_4C(bpOrderStr, ":")
624622 if ((size(bpOrderParts) != 3))
625623 then throw("bpOrderStr should contain exactly 2 ':' separators")
626624 else {
627625 let bpOrdRes = split(bpOrderParts[0], "_")
628626 let bpOrdMat = split(bpOrderParts[1], "_")
629627 let bpOrdProd = if ((bpOrderParts[2] == ""))
630628 then nil
631629 else split_4C(bpOrderParts[2], "_")
632630 if ((size(bpOrdRes) != NUMRES))
633631 then throw("All 6 resources should be passed")
634632 else if ((size(bpOrdMat) != NUMRES))
635633 then throw("All 6 materials should be passed")
636634 else {
637635 let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [shopLandAssetId], nil))
638636 let currentWh = split_4C(wh, ":")
639637 let currWhRes = split(currentWh[whIdxRes], "_")
640638 let currWhMat = split(currentWh[whIdxMat], "_")
641639 let currWhProd = if ((currentWh[whIdxProd] == ""))
642640 then nil
643641 else split_4C(currentWh[whIdxProd], "_")
644642 let currWhLockedVol = parseIntValue(split(currentWh[whIdxLOFT], "_")[volLocked])
645643 let ordKey = keyOrderByLand(shopLandAssetId)
646644 let whOrd = getOrder(ordKey)
647645 let whOrdRes = split(whOrd[ordIdxRes], "_")
648646 let whOrdMat = split(whOrd[ordIdxMat], "_")
649647 let whOrdProd = if ((whOrd[ordIdxProd] == ""))
650648 then nil
651649 else split_4C(whOrd[ordIdxProd], "_")
652650 let r = {
653651 let $l = bpOrdRes
654652 let $s = size($l)
655653 let $acc0 = $Tuple13(nil, nil, nil, 0, 0, 0, 0, bpResList, currWhRes, whOrdRes, resTypes, false, 0)
656654 func $f0_1 ($a,$i) = if (($i >= $s))
657655 then $a
658656 else acceptCommon($a, $l[$i])
659657
660658 func $f0_2 ($a,$i) = if (($i >= $s))
661659 then $a
662660 else throw("List size exceeds 6")
663661
664662 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
665663 }
666664 let m = {
667665 let $l = bpOrdMat
668666 let $s = size($l)
669667 let $acc0 = $Tuple13(nil, nil, nil, r._4, r._5, r._6, 0, bpMatList, currWhMat, whOrdMat, matTypes, false, r._13)
670668 func $f1_1 ($a,$i) = if (($i >= $s))
671669 then $a
672670 else acceptCommon($a, $l[$i])
673671
674672 func $f1_2 ($a,$i) = if (($i >= $s))
675673 then $a
676674 else throw("List size exceeds 6")
677675
678676 $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6)
679677 }
680678 let p = if ((size(bpOrdProd) != 0))
681679 then {
682680 let $l = bpOrdProd
683681 let $s = size($l)
684682 let $acc0 = $Tuple13(nil, nil, nil, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true, m._13)
685683 func $f2_1 ($a,$i) = if (($i >= $s))
686684 then $a
687685 else acceptCommon($a, $l[$i])
688686
689687 func $f2_2 ($a,$i) = if (($i >= $s))
690688 then $a
691689 else throw("List size exceeds 50")
692690
693691 $f2_2($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50)
694692 }
695693 else $Tuple13(currWhProd, whOrdProd, bpProdList, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true, m._13)
696694 let volSaldo = p._4
697695 let newLockedVol = if ((0 > (currWhLockedVol - volSaldo)))
698696 then 0
699697 else (currWhLockedVol - volSaldo)
700698 let whStr = makeString_2C([currentWh[whIdxLevels], makeString(r._1, "_"), makeString(m._1, "_"), makeString_2C(p._1, "_"), toString(newLockedVol)], ":")
701699 let newWhOrdStr = makeString_2C([makeString(r._2, "_"), makeString(m._2, "_"), makeString_2C(p._2, "_")], ":")
702700 let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, shopLandAssetId], nil))
703701 let accStatsResult = asInt(invoke(stakingContract, "updateAccStats", [shopLandOwner, fraction(xpShop, p._13, MULT8)], nil))
704702 $Tuple10(StringEntry(ordKey, newWhOrdStr), r._3, m._3, p._3, p._5, p._6, p._13, shopLandOwner, whSave, accStatsResult)
705703 }
706704 }
707705 }
708706 }
709707 }
710708
711709
712710 func sellResourcesWorldInternal (amount) = {
713711 let oneRes = (amount / 30)
714712 let oneFactoryAmounts = [oneRes, oneRes, oneRes, oneRes, oneRes, oneRes]
715713 let s = toString(oneRes)
716714 let resList = [s, s, s, s, s, s]
717715 let minPrices = [0, 0, 0, 0, 0, 0]
718716 func oneFactory (acc,continent) = {
719717 let x = sellResourcesCommon(resList, continent, oneFactoryAmounts, minPrices)
720718 $Tuple3((acc._1 ++ x._1), (acc._2 + x._3), (acc._3 + x._4))
721719 }
722720
723- let $t02527025360 = {
721+ let $t02529225382 = {
724722 let $l = continents
725723 let $s = size($l)
726724 let $acc0 = $Tuple3(nil, 0, 0)
727725 func $f0_1 ($a,$i) = if (($i >= $s))
728726 then $a
729727 else oneFactory($a, $l[$i])
730728
731729 func $f0_2 ($a,$i) = if (($i >= $s))
732730 then $a
733731 else throw("List size exceeds 5")
734732
735733 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
736734 }
737- let factoryActions = $t02527025360._1
738- let usdtReceived = $t02527025360._2
739- let totalRes = $t02527025360._3
735+ let factoryActions = $t02529225382._1
736+ let usdtReceived = $t02529225382._2
737+ let totalRes = $t02529225382._3
740738 let fee = fraction(usdtReceived, DELIVERY_FEE, MULT6)
741739 let activitiesAmount = (usdtReceived / 100)
742740 let usdtLeft = ((usdtReceived - activitiesAmount) - fee)
743741 $Tuple5(factoryActions, usdtLeft, fee, activitiesAmount, totalRes)
744742 }
745743
746744
747745 func craftGoodsCommon (matList,prodList,manufactoryContinent,productIdx,quantity) = if ((0 >= quantity))
748746 then throw("Quantity should be positive")
749747 else if (if ((0 > productIdx))
750748 then true
751749 else (productIdx >= size(productionMatrix)))
752750 then throw(("Unknown product idx=" + toString(productIdx)))
753751 else {
754752 let recipe = split(productionMatrix[productIdx], "_")
755753 if ((size(recipe) != RECIPESIZE))
756754 then throw(("Fatal: unknown recipe: " + productionMatrix[productIdx]))
757755 else {
758756 let productContIdx = parseIntValue(recipe[rIdxContinent])
759757 if ((continents[productContIdx] != manufactoryContinent))
760758 then throw(((("This product is available in " + continents[productContIdx]) + ", not in ") + manufactoryContinent))
761759 else {
762760 func filler (acc,ignoredItem) = {
763761 let n = acc._2
764762 let xs = if ((size(prodList) > n))
765763 then prodList[n]
766764 else "0"
767765 let x = parseIntValue(xs)
768766 let amount = (quantity * PRODUCTPKGSIZE)
769767 let y = if ((n == productIdx))
770768 then toString((x + amount))
771769 else xs
772770 $Tuple2((acc._1 :+ y), (n + 1))
773771 }
774772
775773 let newProd = ( let $l = productionMatrix
776774 let $s = size($l)
777775 let $acc0 = $Tuple2(nil, 0)
778776 func $f0_1 ($a,$i) = if (($i >= $s))
779777 then $a
780778 else filler($a, $l[$i])
781779
782780 func $f0_2 ($a,$i) = if (($i >= $s))
783781 then $a
784782 else throw("List size exceeds 50")
785783
786784 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50))._1
787785 func producer (acc,j) = {
788786 let needMat = (((parseIntValue(recipe[j]) * MULT5) * quantity) * parseIntValue(recipe[rIdxCoeff]))
789787 let haveMat = parseIntValue(matList[j])
790788 if ((needMat > haveMat))
791789 then throw(((((((("You have " + fixedPoint(haveMat, 8)) + " of ") + matTypes[j]) + ", but recipe requires ") + fixedPoint(needMat, 8)) + " for quantity ") + toString(quantity)))
792790 else if ((needMat > 0))
793791 then $Tuple2((acc._1 :+ toString((haveMat - needMat))), (acc._2 + needMat))
794792 else $Tuple2((acc._1 :+ matList[j]), acc._2)
795793 }
796794
797795 let merged = {
798796 let $l = ITER6
799797 let $s = size($l)
800798 let $acc0 = $Tuple2(nil, 0)
801799 func $f1_1 ($a,$i) = if (($i >= $s))
802800 then $a
803801 else producer($a, $l[$i])
804802
805803 func $f1_2 ($a,$i) = if (($i >= $s))
806804 then $a
807805 else throw("List size exceeds 6")
808806
809807 $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6)
810808 }
811809 $Tuple3(merged._1, newProd, merged._2)
812810 }
813811 }
814812 }
815813
816814
817815 @Callable(i)
818816 func recalcLockedVolumeREADONLY (landAssetId,wh) = {
819817 let currentOrd = getOrder(keyOrderByLand(landAssetId))
820818 let z = setInternal(wh, currentOrd, currentOrd)
821819 $Tuple2(nil, (z._4 + z._5))
822820 }
823821
824822
825823
826824 @Callable(i)
827825 func constructorV1 (restAddr) = if ((i.caller != this))
828826 then throw("Permission denied")
829827 else [StringEntry(keyRestAddress(), restAddr)]
830828
831829
832830
833831 @Callable(i)
834832 func sellResources (amounts,minPrices) = {
835833 let prologResult = prolog()
836834 if ((prologResult == prologResult))
837835 then {
838836 let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
839837 if ((size(i.payments) != 0))
840838 then throw("sellResources doesn't require any payments")
841839 else {
842840 let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_")
843841 if ((curLocation[locIdxType] != "F"))
844842 then throw(("Duck location type should be Factory, but is " + curLocation[locIdxType]))
845843 else {
846844 let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
847845 let resList = split(currentPack[bpIdxRes], "_")
848- let $t02889329019 = sellResourcesCommon(resList, curLocation[locIdxId], amounts, minPrices)
849- let factoryActions = $t02889329019._1
850- let newRes = $t02889329019._2
851- let usdtReceived = $t02889329019._3
852- let totalRes = $t02889329019._4
846+ let $t02891529041 = sellResourcesCommon(resList, curLocation[locIdxId], amounts, minPrices)
847+ let factoryActions = $t02891529041._1
848+ let newRes = $t02891529041._2
849+ let usdtReceived = $t02891529041._3
850+ let totalRes = $t02891529041._4
853851 let activitiesAmount = (usdtReceived / 100)
854852 let newPack = makeString_2C([currentPack[bpIdxLevel], makeString(newRes, "_"), currentPack[bpIdxMat], currentPack[bpIdxProd]], ":")
855853 let backpackResult = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
856854 let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpTrade, totalRes, MULT8)], nil))
857855 $Tuple2(((factoryActions :+ ScriptTransfer(i.caller, (usdtReceived - activitiesAmount), usdtAssetId)) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)), $Tuple3(backpackResult, prologResult, statsResult))
858856 }
859857 }
860858 }
861859 else throw("Strict value is not equal to itself.")
862860 }
863861
864862
865863
866864 @Callable(i)
867865 func sellResourcesWorld (addr,amount) = if ((i.caller != acresContract))
868866 then throw("Permission denied")
869867 else {
870- let $t02981129968 = sellResourcesWorldInternal(amount)
871- let factoryActions = $t02981129968._1
872- let usdtLeft = $t02981129968._2
873- let fee = $t02981129968._3
874- let activitiesAmount = $t02981129968._4
875- let totalRes = $t02981129968._5
868+ let $t02983329990 = sellResourcesWorldInternal(amount)
869+ let factoryActions = $t02983329990._1
870+ let usdtLeft = $t02983329990._2
871+ let fee = $t02983329990._3
872+ let activitiesAmount = $t02983329990._4
873+ let totalRes = $t02983329990._5
876874 if ((0 >= usdtLeft))
877875 then throw(("This trade does not cover delivery cost of " + fixedPoint(fee, 6)))
878876 else {
879877 let statsResult = asInt(invoke(stakingContract, "updateAccStats", [addr, fraction(xpTrade, totalRes, MULT8)], nil))
880878 $Tuple2((((factoryActions :+ IntegerEntry(deliveryFundKey, (valueOrElse(getInteger(deliveryFundKey), 0) + fee))) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)) :+ ScriptTransfer(investFundContract, usdtLeft, usdtAssetId)), $Tuple2(usdtLeft, statsResult))
881879 }
882880 }
883881
884882
885883
886884 @Callable(i)
887885 func sellResourcesWorldREADONLY (amount) = {
888886 let usdtLeft = sellResourcesWorldInternal(amount)._2
889887 $Tuple2(nil, usdtLeft)
890888 }
891889
892890
893891
894892 @Callable(i)
895-func sellResourcesDuckDelivery (amounts,minPrices,factoryContinent) = if (!(KS_ALLOW_DELIVERY))
896- then throw("Delivery feature is turned off!")
897- else {
898- let prologResult = prolog()
899- if ((prologResult == prologResult))
900- then {
901- let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
902- if ((size(i.payments) != 0))
903- then throw("sellResources doesn't require any payments")
904- else {
905- let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
906- let resList = split(currentPack[bpIdxRes], "_")
907- let $t03120431325 = sellResourcesCommon(resList, factoryContinent, amounts, minPrices)
908- let factoryActions = $t03120431325._1
909- let newRes = $t03120431325._2
910- let usdtReceived = $t03120431325._3
911- let totalRes = $t03120431325._4
912- let newPack = makeString_2C([currentPack[bpIdxLevel], makeString(newRes, "_"), currentPack[bpIdxMat], currentPack[bpIdxProd]], ":")
913- let backpackResult = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
914- let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpTrade, totalRes, MULT8)], nil))
915- let feePart = fraction(usdtReceived, DELIVERY_FEE, MULT6)
916- let fee = max([feePart, MIN_USDT_FEE_DELIVERY])
917- let activitiesAmount = (usdtReceived / 100)
918- if ((fee >= (usdtReceived - activitiesAmount)))
919- then throw(("This trade does not cover delivery cost of " + fixedPoint(fee, 6)))
920- else {
921- let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
922- $Tuple2((((factoryActions :+ ScriptTransfer(i.caller, ((usdtReceived - activitiesAmount) - fee), usdtAssetId)) :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)), $Tuple3(backpackResult, prologResult, statsResult))
923- }
924- }
925- }
926- else throw("Strict value is not equal to itself.")
927- }
893+func sellResourcesDuckDelivery (amounts,minPrices,factoryContinent) = {
894+ let prologResult = prolog()
895+ if ((prologResult == prologResult))
896+ then {
897+ let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
898+ if ((size(i.payments) != 0))
899+ then throw("sellResources doesn't require any payments")
900+ else {
901+ let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
902+ let resList = split(currentPack[bpIdxRes], "_")
903+ let $t03114931270 = sellResourcesCommon(resList, factoryContinent, amounts, minPrices)
904+ let factoryActions = $t03114931270._1
905+ let newRes = $t03114931270._2
906+ let usdtReceived = $t03114931270._3
907+ let totalRes = $t03114931270._4
908+ let newPack = makeString_2C([currentPack[bpIdxLevel], makeString(newRes, "_"), currentPack[bpIdxMat], currentPack[bpIdxProd]], ":")
909+ let backpackResult = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
910+ let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpTrade, totalRes, MULT8)], nil))
911+ let feePart = fraction(usdtReceived, DELIVERY_FEE, MULT6)
912+ let fee = max([feePart, MIN_USDT_FEE_DELIVERY])
913+ let activitiesAmount = (usdtReceived / 100)
914+ if ((fee >= (usdtReceived - activitiesAmount)))
915+ then throw(("This trade does not cover delivery cost of " + fixedPoint(fee, 6)))
916+ else {
917+ let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
918+ $Tuple2((((factoryActions :+ ScriptTransfer(i.caller, ((usdtReceived - activitiesAmount) - fee), usdtAssetId)) :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)), $Tuple3(backpackResult, prologResult, statsResult))
919+ }
920+ }
921+ }
922+ else throw("Strict value is not equal to itself.")
923+ }
928924
929925
930926
931927 @Callable(i)
932-func sellResourcesLandDelivery (amounts,minPrices,landAssetId,factoryContinent) = if (!(KS_ALLOW_DELIVERY))
933- then throw("Delivery feature is turned off!")
934- else {
935- let prologResult = prolog()
936- if ((prologResult == prologResult))
937- then if ((size(i.payments) != 0))
938- then throw("sellResources doesn't require any payments")
939- else {
940- let user = i.caller
941- let addr = toString(user)
942- let asset = value(assetInfo(fromBase58String(landAssetId)))
943- if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
944- then throw((("NFT " + asset.name) + " is not staked"))
945- else {
946- let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
947- if ((owner != addr))
948- then throw((LANDPREFIX + " is not yours"))
949- else {
950- let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
951- let currentWh = split_4C(wh, ":")
952- let resList = split(currentWh[whIdxRes], "_")
953- let $t03331633437 = sellResourcesCommon(resList, factoryContinent, amounts, minPrices)
954- let factoryActions = $t03331633437._1
955- let newRes = $t03331633437._2
956- let usdtReceived = $t03331633437._3
957- let totalRes = $t03331633437._4
958- let whStr = makeString_2C([currentWh[whIdxLevels], makeString(newRes, "_"), currentWh[whIdxMat], currentWh[whIdxProd], currentWh[whIdxLOFT]], ":")
959- let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil))
960- let statsResult = asInt(invoke(stakingContract, "updateAccStats", [addr, fraction(xpTrade, totalRes, MULT8)], nil))
961- let feePart = fraction(usdtReceived, DELIVERY_FEE, MULT6)
962- let fee = max([feePart, MIN_USDT_FEE_DELIVERY])
963- let activitiesAmount = (usdtReceived / 100)
964- if ((fee >= (usdtReceived - activitiesAmount)))
965- then throw(("This trade does not cover delivery cost of " + fixedPoint(fee, 6)))
966- else {
967- let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
968- $Tuple2((((factoryActions :+ ScriptTransfer(i.caller, ((usdtReceived - activitiesAmount) - fee), usdtAssetId)) :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)), $Tuple3(whSave, prologResult, statsResult))
969- }
970- }
971- }
972- }
973- else throw("Strict value is not equal to itself.")
974- }
928+func sellResourcesLandDelivery (amounts,minPrices,landAssetId,factoryContinent) = {
929+ let prologResult = prolog()
930+ if ((prologResult == prologResult))
931+ then if ((size(i.payments) != 0))
932+ then throw("sellResources doesn't require any payments")
933+ else {
934+ let user = i.caller
935+ let addr = toString(user)
936+ let asset = value(assetInfo(fromBase58String(landAssetId)))
937+ if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
938+ then throw((("NFT " + asset.name) + " is not staked"))
939+ else {
940+ let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
941+ if ((owner != addr))
942+ then throw((LANDPREFIX + " is not yours"))
943+ else {
944+ let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
945+ let currentWh = split_4C(wh, ":")
946+ let resList = split(currentWh[whIdxRes], "_")
947+ let $t03318433305 = sellResourcesCommon(resList, factoryContinent, amounts, minPrices)
948+ let factoryActions = $t03318433305._1
949+ let newRes = $t03318433305._2
950+ let usdtReceived = $t03318433305._3
951+ let totalRes = $t03318433305._4
952+ let whStr = makeString_2C([currentWh[whIdxLevels], makeString(newRes, "_"), currentWh[whIdxMat], currentWh[whIdxProd], currentWh[whIdxLOFT]], ":")
953+ let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil))
954+ let statsResult = asInt(invoke(stakingContract, "updateAccStats", [addr, fraction(xpTrade, totalRes, MULT8)], nil))
955+ let feePart = fraction(usdtReceived, DELIVERY_FEE, MULT6)
956+ let fee = max([feePart, MIN_USDT_FEE_DELIVERY])
957+ let activitiesAmount = (usdtReceived / 100)
958+ if ((fee >= (usdtReceived - activitiesAmount)))
959+ then throw(("This trade does not cover delivery cost of " + fixedPoint(fee, 6)))
960+ else {
961+ let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
962+ $Tuple2((((factoryActions :+ ScriptTransfer(i.caller, ((usdtReceived - activitiesAmount) - fee), usdtAssetId)) :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)), $Tuple3(whSave, prologResult, statsResult))
963+ }
964+ }
965+ }
966+ }
967+ else throw("Strict value is not equal to itself.")
968+ }
975969
976970
977971
978972 @Callable(i)
979973 func buyMaterials (amounts,maxPrices) = {
980974 let prologResult = prolog()
981975 if ((prologResult == prologResult))
982976 then {
983977 let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
984978 if ((size(i.payments) != 1))
985979 then throw("exactly 1 payment must be attached")
986980 else {
987981 let pmt = i.payments[0]
988982 let amt = pmt.amount
989983 if (if (!(isDefined(pmt.assetId)))
990984 then true
991985 else (value(pmt.assetId) != usdtAssetId))
992986 then throw("USDT payments only!")
993987 else {
994988 let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_")
995989 if ((curLocation[locIdxType] != "F"))
996990 then throw(("Duck location type should be Factory, but is " + curLocation[locIdxType]))
997991 else {
998992 let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
999993 let matList = split(currentPack[bpIdxMat], "_")
1000- let $t03526135383 = buyMaterialsCommon(matList, curLocation[locIdxId], amounts, maxPrices)
1001- let factoryActions = $t03526135383._1
1002- let newMat = $t03526135383._2
1003- let usdtSpent = $t03526135383._3
1004- let totalMat = $t03526135383._4
994+ let $t03512935251 = buyMaterialsCommon(matList, curLocation[locIdxId], amounts, maxPrices)
995+ let factoryActions = $t03512935251._1
996+ let newMat = $t03512935251._2
997+ let usdtSpent = $t03512935251._3
998+ let totalMat = $t03512935251._4
1005999 if ((usdtSpent > amt))
10061000 then throw(((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(usdtSpent, 6)))
10071001 else {
10081002 let newPack = makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], makeString(newMat, "_"), currentPack[bpIdxProd]], ":")
10091003 let backpackResult = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
10101004 let rest = if (((amt - usdtSpent) > 0))
10111005 then [ScriptTransfer(i.caller, (amt - usdtSpent), usdtAssetId)]
10121006 else nil
10131007 let activitiesAmount = (usdtSpent / 100)
10141008 let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpTrade, totalMat, MULT8)], nil))
10151009 $Tuple2(((factoryActions ++ rest) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)), $Tuple3(backpackResult, prologResult, statsResult))
10161010 }
10171011 }
10181012 }
10191013 }
10201014 }
10211015 else throw("Strict value is not equal to itself.")
10221016 }
10231017
10241018
10251019
10261020 @Callable(i)
1027-func buyMaterialsDuckDelivery (amounts,maxPrices,factoryContinent) = if (!(KS_ALLOW_DELIVERY))
1028- then throw("Delivery feature is turned off!")
1029- else {
1030- let prologResult = prolog()
1031- if ((prologResult == prologResult))
1032- then {
1033- let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
1034- if ((size(i.payments) != 1))
1035- then throw("exactly 1 payment must be attached")
1036- else {
1037- let pmt = i.payments[0]
1038- let amt = pmt.amount
1039- if (if (!(isDefined(pmt.assetId)))
1040- then true
1041- else (value(pmt.assetId) != usdtAssetId))
1042- then throw("USDT payments only!")
1043- else {
1044- let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
1045- let matList = split(currentPack[bpIdxMat], "_")
1046- let $t03690437021 = buyMaterialsCommon(matList, factoryContinent, amounts, maxPrices)
1047- let factoryActions = $t03690437021._1
1048- let newMat = $t03690437021._2
1049- let usdtSpent = $t03690437021._3
1050- let totalMat = $t03690437021._4
1051- let newPack = makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], makeString(newMat, "_"), currentPack[bpIdxProd]], ":")
1052- let backpackResult = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
1053- let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpTrade, totalMat, MULT8)], nil))
1054- let feePart = fraction(usdtSpent, DELIVERY_FEE, MULT6)
1055- let fee = max([feePart, MIN_USDT_FEE_DELIVERY])
1056- let usdtSpentWithFee = (usdtSpent + fee)
1057- if ((usdtSpentWithFee > amt))
1058- then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(usdtSpent, 6)) + "+") + fixedPoint(fee, 6)) + "(delivery fee)"))
1059- else {
1060- let rest = if (((amt - usdtSpentWithFee) > 0))
1061- then [ScriptTransfer(i.caller, (amt - usdtSpentWithFee), usdtAssetId)]
1062- else nil
1063- let activitiesAmount = (usdtSpent / 100)
1064- let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1065- $Tuple2((((factoryActions ++ rest) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)) :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))), $Tuple3(backpackResult, prologResult, statsResult))
1066- }
1067- }
1068- }
1069- }
1070- else throw("Strict value is not equal to itself.")
1071- }
1072-
1073-
1074-
1075-@Callable(i)
1076-func buyMaterialsLandDelivery (amounts,maxPrices,landAssetId,factoryContinent) = if (!(KS_ALLOW_DELIVERY))
1077- then throw("Delivery feature is turned off!")
1078- else {
1079- let prologResult = prolog()
1080- if ((prologResult == prologResult))
1081- then if ((size(i.payments) != 1))
1021+func buyMaterialsDuckDelivery (amounts,maxPrices,factoryContinent) = {
1022+ let prologResult = prolog()
1023+ if ((prologResult == prologResult))
1024+ then {
1025+ let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
1026+ if ((size(i.payments) != 1))
10821027 then throw("exactly 1 payment must be attached")
10831028 else {
10841029 let pmt = i.payments[0]
10851030 let amt = pmt.amount
10861031 if (if (!(isDefined(pmt.assetId)))
10871032 then true
10881033 else (value(pmt.assetId) != usdtAssetId))
10891034 then throw("USDT payments only!")
10901035 else {
1091- let user = i.caller
1092- let addr = toString(user)
1093- let asset = value(assetInfo(fromBase58String(landAssetId)))
1094- if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
1095- then throw((("NFT " + asset.name) + " is not staked"))
1036+ let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
1037+ let matList = split(currentPack[bpIdxMat], "_")
1038+ let $t03669536812 = buyMaterialsCommon(matList, factoryContinent, amounts, maxPrices)
1039+ let factoryActions = $t03669536812._1
1040+ let newMat = $t03669536812._2
1041+ let usdtSpent = $t03669536812._3
1042+ let totalMat = $t03669536812._4
1043+ let newPack = makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], makeString(newMat, "_"), currentPack[bpIdxProd]], ":")
1044+ let backpackResult = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
1045+ let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpTrade, totalMat, MULT8)], nil))
1046+ let feePart = fraction(usdtSpent, DELIVERY_FEE, MULT6)
1047+ let fee = max([feePart, MIN_USDT_FEE_DELIVERY])
1048+ let usdtSpentWithFee = (usdtSpent + fee)
1049+ if ((usdtSpentWithFee > amt))
1050+ then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(usdtSpent, 6)) + "+") + fixedPoint(fee, 6)) + "(delivery fee)"))
10961051 else {
1097- let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
1098- if ((owner != addr))
1099- then throw((LANDPREFIX + " is not yours"))
1100- else {
1101- let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
1102- let currentWh = split_4C(wh, ":")
1103- let matList = split(currentWh[whIdxMat], "_")
1104- let $t03926339380 = buyMaterialsCommon(matList, factoryContinent, amounts, maxPrices)
1105- let factoryActions = $t03926339380._1
1106- let newMat = $t03926339380._2
1107- let usdtSpent = $t03926339380._3
1108- let totalMat = $t03926339380._4
1109- let whStr = makeString_2C([currentWh[whIdxLevels], currentWh[whIdxRes], makeString(newMat, "_"), currentWh[whIdxProd], currentWh[whIdxLOFT]], ":")
1110- let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil))
1111- let statsResult = asInt(invoke(stakingContract, "updateAccStats", [addr, fraction(xpTrade, totalMat, MULT8)], nil))
1112- let feePart = fraction(usdtSpent, DELIVERY_FEE, MULT6)
1113- let fee = max([feePart, MIN_USDT_FEE_DELIVERY])
1114- let usdtSpentWithFee = (usdtSpent + fee)
1115- if ((usdtSpentWithFee > amt))
1116- then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(usdtSpent, 6)) + "+") + fixedPoint(fee, 6)) + "(delivery fee)"))
1117- else {
1118- let rest = if (((amt - usdtSpentWithFee) > 0))
1119- then [ScriptTransfer(i.caller, (amt - usdtSpentWithFee), usdtAssetId)]
1120- else nil
1121- let activitiesAmount = (usdtSpent / 100)
1122- let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1123- $Tuple2((((factoryActions ++ rest) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)) :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))), $Tuple3(whSave, prologResult, statsResult))
1124- }
1125- }
1052+ let rest = if (((amt - usdtSpentWithFee) > 0))
1053+ then [ScriptTransfer(i.caller, (amt - usdtSpentWithFee), usdtAssetId)]
1054+ else nil
1055+ let activitiesAmount = (usdtSpent / 100)
1056+ let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1057+ $Tuple2((((factoryActions ++ rest) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)) :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))), $Tuple3(backpackResult, prologResult, statsResult))
11261058 }
11271059 }
11281060 }
1129- else throw("Strict value is not equal to itself.")
1130- }
1061+ }
1062+ else throw("Strict value is not equal to itself.")
1063+ }
1064+
1065+
1066+
1067+@Callable(i)
1068+func buyMaterialsLandDelivery (amounts,maxPrices,landAssetId,factoryContinent) = {
1069+ let prologResult = prolog()
1070+ if ((prologResult == prologResult))
1071+ then if ((size(i.payments) != 1))
1072+ then throw("exactly 1 payment must be attached")
1073+ else {
1074+ let pmt = i.payments[0]
1075+ let amt = pmt.amount
1076+ if (if (!(isDefined(pmt.assetId)))
1077+ then true
1078+ else (value(pmt.assetId) != usdtAssetId))
1079+ then throw("USDT payments only!")
1080+ else {
1081+ let user = i.caller
1082+ let addr = toString(user)
1083+ let asset = value(assetInfo(fromBase58String(landAssetId)))
1084+ if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
1085+ then throw((("NFT " + asset.name) + " is not staked"))
1086+ else {
1087+ let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
1088+ if ((owner != addr))
1089+ then throw((LANDPREFIX + " is not yours"))
1090+ else {
1091+ let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
1092+ let currentWh = split_4C(wh, ":")
1093+ let matList = split(currentWh[whIdxMat], "_")
1094+ let $t03897739094 = buyMaterialsCommon(matList, factoryContinent, amounts, maxPrices)
1095+ let factoryActions = $t03897739094._1
1096+ let newMat = $t03897739094._2
1097+ let usdtSpent = $t03897739094._3
1098+ let totalMat = $t03897739094._4
1099+ let whStr = makeString_2C([currentWh[whIdxLevels], currentWh[whIdxRes], makeString(newMat, "_"), currentWh[whIdxProd], currentWh[whIdxLOFT]], ":")
1100+ let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil))
1101+ let statsResult = asInt(invoke(stakingContract, "updateAccStats", [addr, fraction(xpTrade, totalMat, MULT8)], nil))
1102+ let feePart = fraction(usdtSpent, DELIVERY_FEE, MULT6)
1103+ let fee = max([feePart, MIN_USDT_FEE_DELIVERY])
1104+ let usdtSpentWithFee = (usdtSpent + fee)
1105+ if ((usdtSpentWithFee > amt))
1106+ then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(usdtSpent, 6)) + "+") + fixedPoint(fee, 6)) + "(delivery fee)"))
1107+ else {
1108+ let rest = if (((amt - usdtSpentWithFee) > 0))
1109+ then [ScriptTransfer(i.caller, (amt - usdtSpentWithFee), usdtAssetId)]
1110+ else nil
1111+ let activitiesAmount = (usdtSpent / 100)
1112+ let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1113+ $Tuple2((((factoryActions ++ rest) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)) :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))), $Tuple3(whSave, prologResult, statsResult))
1114+ }
1115+ }
1116+ }
1117+ }
1118+ }
1119+ else throw("Strict value is not equal to itself.")
1120+ }
11311121
11321122
11331123
11341124 @Callable(i)
11351125 func exchangeResources (amounts) = {
11361126 let prologResult = prolog()
11371127 if ((prologResult == prologResult))
11381128 then {
11391129 let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
11401130 if ((size(i.payments) != 1))
11411131 then throw("exactly 1 payment must be attached")
11421132 else {
11431133 let pmt = i.payments[0]
11441134 let amt = pmt.amount
11451135 if (if (!(isDefined(pmt.assetId)))
11461136 then true
11471137 else (value(pmt.assetId) != usdtAssetId))
11481138 then throw("USDT payments only!")
11491139 else {
11501140 let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_")
11511141 if ((curLocation[locIdxType] != "F"))
11521142 then throw(("Duck location type should be Factory, but is " + curLocation[locIdxType]))
11531143 else {
11541144 let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
11551145 let resList = split(currentPack[bpIdxRes], "_")
11561146 let matList = split(currentPack[bpIdxMat], "_")
1157- let $t04145841564 = exchangeResourcesCommon(resList, matList, amounts)
1158- let newRes = $t04145841564._1
1159- let newMat = $t04145841564._2
1160- let usdtSpent = $t04145841564._3
1161- let totalAmountConverted = $t04145841564._4
1147+ let $t04117241278 = exchangeResourcesCommon(resList, matList, amounts)
1148+ let newRes = $t04117241278._1
1149+ let newMat = $t04117241278._2
1150+ let usdtSpent = $t04117241278._3
1151+ let totalAmountConverted = $t04117241278._4
11621152 if ((usdtSpent > amt))
11631153 then throw(((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(usdtSpent, 6)))
11641154 else {
11651155 let newPack = makeString([currentPack[bpIdxLevel], makeString(newRes, "_"), makeString(newMat, "_"), currentPack[bpIdxProd]], ":")
11661156 let backpackResult = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
11671157 let rest = if (((amt - usdtSpent) > 0))
11681158 then [ScriptTransfer(i.caller, (amt - usdtSpent), usdtAssetId)]
11691159 else nil
11701160 let activitiesAmount = (usdtSpent / 100)
11711161 let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpTrade, totalAmountConverted, MULT8)], nil))
11721162 $Tuple2((rest :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)), $Tuple3(backpackResult, prologResult, statsResult))
11731163 }
11741164 }
11751165 }
11761166 }
11771167 }
11781168 else throw("Strict value is not equal to itself.")
11791169 }
11801170
11811171
11821172
11831173 @Callable(i)
1184-func exchangeResourcesDuckDelivery (amounts) = if (!(KS_ALLOW_DELIVERY))
1185- then throw("Delivery feature is turned off!")
1186- else {
1187- let prologResult = prolog()
1188- if ((prologResult == prologResult))
1189- then {
1190- let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
1191- if ((size(i.payments) != 1))
1192- then throw("exactly 1 payment must be attached")
1193- else {
1194- let pmt = i.payments[0]
1195- let amt = pmt.amount
1196- if (if (!(isDefined(pmt.assetId)))
1197- then true
1198- else (value(pmt.assetId) != usdtAssetId))
1199- then throw("USDT payments only!")
1200- else {
1201- let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
1202- let resList = split(currentPack[bpIdxRes], "_")
1203- let matList = split(currentPack[bpIdxMat], "_")
1204- let $t04307943185 = exchangeResourcesCommon(resList, matList, amounts)
1205- let newRes = $t04307943185._1
1206- let newMat = $t04307943185._2
1207- let usdtSpent = $t04307943185._3
1208- let totalAmountConverted = $t04307943185._4
1209- let feePart = fraction(usdtSpent, DELIVERY_FEE15, MULT6)
1210- let fee = max([feePart, MIN_USDT_FEE_DELIVERY15])
1211- let usdtSpentWithFee = (usdtSpent + fee)
1212- if ((usdtSpentWithFee > amt))
1213- then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(usdtSpent, 6)) + "+") + fixedPoint(fee, 6)) + "(delivery fee)"))
1214- else {
1215- let newPack = makeString([currentPack[bpIdxLevel], makeString(newRes, "_"), makeString(newMat, "_"), currentPack[bpIdxProd]], ":")
1216- let backpackResult = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
1217- let rest = if (((amt - usdtSpentWithFee) > 0))
1218- then [ScriptTransfer(i.caller, (amt - usdtSpentWithFee), usdtAssetId)]
1219- else nil
1220- let activitiesAmount = (usdtSpent / 100)
1221- let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpTrade, totalAmountConverted, MULT8)], nil))
1222- let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1223- $Tuple2(((rest :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)) :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))), $Tuple3(backpackResult, prologResult, statsResult))
1224- }
1225- }
1226- }
1227- }
1228- else throw("Strict value is not equal to itself.")
1229- }
1230-
1231-
1232-
1233-@Callable(i)
1234-func exchangeResourcesLandDelivery (amounts,landAssetId) = if (!(KS_ALLOW_DELIVERY))
1235- then throw("Delivery feature is turned off!")
1236- else {
1237- let prologResult = prolog()
1238- if ((prologResult == prologResult))
1239- then if ((size(i.payments) != 1))
1174+func exchangeResourcesDuckDelivery (amounts) = {
1175+ let prologResult = prolog()
1176+ if ((prologResult == prologResult))
1177+ then {
1178+ let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
1179+ if ((size(i.payments) != 1))
12401180 then throw("exactly 1 payment must be attached")
12411181 else {
12421182 let pmt = i.payments[0]
12431183 let amt = pmt.amount
12441184 if (if (!(isDefined(pmt.assetId)))
12451185 then true
12461186 else (value(pmt.assetId) != usdtAssetId))
12471187 then throw("USDT payments only!")
12481188 else {
1249- let user = i.caller
1250- let addr = toString(user)
1251- let asset = value(assetInfo(fromBase58String(landAssetId)))
1252- if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
1253- then throw((("NFT " + asset.name) + " is not staked"))
1189+ let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
1190+ let resList = split(currentPack[bpIdxRes], "_")
1191+ let matList = split(currentPack[bpIdxMat], "_")
1192+ let $t04271642822 = exchangeResourcesCommon(resList, matList, amounts)
1193+ let newRes = $t04271642822._1
1194+ let newMat = $t04271642822._2
1195+ let usdtSpent = $t04271642822._3
1196+ let totalAmountConverted = $t04271642822._4
1197+ let feePart = fraction(usdtSpent, DELIVERY_FEE15, MULT6)
1198+ let fee = max([feePart, MIN_USDT_FEE_DELIVERY15])
1199+ let usdtSpentWithFee = (usdtSpent + fee)
1200+ if ((usdtSpentWithFee > amt))
1201+ then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(usdtSpent, 6)) + "+") + fixedPoint(fee, 6)) + "(delivery fee)"))
12541202 else {
1255- let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
1256- if ((owner != addr))
1257- then throw((LANDPREFIX + " is not yours"))
1258- else {
1259- let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
1260- let currentWh = split_4C(wh, ":")
1261- let resList = split(currentWh[whIdxRes], "_")
1262- let matList = split(currentWh[whIdxMat], "_")
1263- let $t04544745553 = exchangeResourcesCommon(resList, matList, amounts)
1264- let newRes = $t04544745553._1
1265- let newMat = $t04544745553._2
1266- let usdtSpent = $t04544745553._3
1267- let totalAmountConverted = $t04544745553._4
1268- let whStr = makeString_2C([currentWh[whIdxLevels], makeString(newRes, "_"), makeString(newMat, "_"), currentWh[whIdxProd], currentWh[whIdxLOFT]], ":")
1269- let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil))
1270- let statsResult = asInt(invoke(stakingContract, "updateAccStats", [addr, fraction(xpTrade, totalAmountConverted, MULT8)], nil))
1271- let feePart = fraction(usdtSpent, DELIVERY_FEE15, MULT6)
1272- let fee = max([feePart, MIN_USDT_FEE_DELIVERY15])
1273- let usdtSpentWithFee = (usdtSpent + fee)
1274- if ((usdtSpentWithFee > amt))
1275- then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(usdtSpent, 6)) + "+") + fixedPoint(fee, 6)) + "(delivery fee)"))
1276- else {
1277- let rest = if (((amt - usdtSpentWithFee) > 0))
1278- then [ScriptTransfer(i.caller, (amt - usdtSpentWithFee), usdtAssetId)]
1279- else nil
1280- let activitiesAmount = (usdtSpent / 100)
1281- let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1282- $Tuple2(((rest :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)) :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))), $Tuple3(whSave, prologResult, statsResult))
1283- }
1284- }
1203+ let newPack = makeString([currentPack[bpIdxLevel], makeString(newRes, "_"), makeString(newMat, "_"), currentPack[bpIdxProd]], ":")
1204+ let backpackResult = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
1205+ let rest = if (((amt - usdtSpentWithFee) > 0))
1206+ then [ScriptTransfer(i.caller, (amt - usdtSpentWithFee), usdtAssetId)]
1207+ else nil
1208+ let activitiesAmount = (usdtSpent / 100)
1209+ let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpTrade, totalAmountConverted, MULT8)], nil))
1210+ let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1211+ $Tuple2(((rest :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)) :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))), $Tuple3(backpackResult, prologResult, statsResult))
12851212 }
12861213 }
12871214 }
1288- else throw("Strict value is not equal to itself.")
1289- }
1215+ }
1216+ else throw("Strict value is not equal to itself.")
1217+ }
1218+
1219+
1220+
1221+@Callable(i)
1222+func exchangeResourcesLandDelivery (amounts,landAssetId) = {
1223+ let prologResult = prolog()
1224+ if ((prologResult == prologResult))
1225+ then if ((size(i.payments) != 1))
1226+ then throw("exactly 1 payment must be attached")
1227+ else {
1228+ let pmt = i.payments[0]
1229+ let amt = pmt.amount
1230+ if (if (!(isDefined(pmt.assetId)))
1231+ then true
1232+ else (value(pmt.assetId) != usdtAssetId))
1233+ then throw("USDT payments only!")
1234+ else {
1235+ let user = i.caller
1236+ let addr = toString(user)
1237+ let asset = value(assetInfo(fromBase58String(landAssetId)))
1238+ if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
1239+ then throw((("NFT " + asset.name) + " is not staked"))
1240+ else {
1241+ let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
1242+ if ((owner != addr))
1243+ then throw((LANDPREFIX + " is not yours"))
1244+ else {
1245+ let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
1246+ let currentWh = split_4C(wh, ":")
1247+ let resList = split(currentWh[whIdxRes], "_")
1248+ let matList = split(currentWh[whIdxMat], "_")
1249+ let $t04500745113 = exchangeResourcesCommon(resList, matList, amounts)
1250+ let newRes = $t04500745113._1
1251+ let newMat = $t04500745113._2
1252+ let usdtSpent = $t04500745113._3
1253+ let totalAmountConverted = $t04500745113._4
1254+ let whStr = makeString_2C([currentWh[whIdxLevels], makeString(newRes, "_"), makeString(newMat, "_"), currentWh[whIdxProd], currentWh[whIdxLOFT]], ":")
1255+ let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil))
1256+ let statsResult = asInt(invoke(stakingContract, "updateAccStats", [addr, fraction(xpTrade, totalAmountConverted, MULT8)], nil))
1257+ let feePart = fraction(usdtSpent, DELIVERY_FEE15, MULT6)
1258+ let fee = max([feePart, MIN_USDT_FEE_DELIVERY15])
1259+ let usdtSpentWithFee = (usdtSpent + fee)
1260+ if ((usdtSpentWithFee > amt))
1261+ then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(usdtSpent, 6)) + "+") + fixedPoint(fee, 6)) + "(delivery fee)"))
1262+ else {
1263+ let rest = if (((amt - usdtSpentWithFee) > 0))
1264+ then [ScriptTransfer(i.caller, (amt - usdtSpentWithFee), usdtAssetId)]
1265+ else nil
1266+ let activitiesAmount = (usdtSpent / 100)
1267+ let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1268+ $Tuple2(((rest :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)) :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))), $Tuple3(whSave, prologResult, statsResult))
1269+ }
1270+ }
1271+ }
1272+ }
1273+ }
1274+ else throw("Strict value is not equal to itself.")
1275+ }
12901276
12911277
12921278
12931279 @Callable(i)
12941280 func craftGoods (productIdx,quantity) = {
12951281 let prologResult = prolog()
12961282 if ((prologResult == prologResult))
12971283 then if ((size(i.payments) != 1))
12981284 then throw("exactly 1 payment must be attached")
12991285 else {
13001286 let pmt = i.payments[0]
13011287 let amt = pmt.amount
13021288 if (if (!(isDefined(pmt.assetId)))
13031289 then true
13041290 else (value(pmt.assetId) != usdtAssetId))
13051291 then throw("USDT payments only!")
13061292 else if ((amt != MULT6))
13071293 then throw((("exactly " + fixedPoint(CRAFT_USDT_COST, 6)) + " USDT must be attached as payment"))
13081294 else {
13091295 let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
13101296 let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_")
13111297 if ((curLocation[locIdxType] != "M"))
13121298 then throw(("Duck location type should be Manufactory, but is " + curLocation[locIdxType]))
13131299 else {
13141300 let cont = curLocation[locIdxContinent]
13151301 let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
13161302 let matList = split(currentPack[bpIdxMat], "_")
13171303 let prodList = if ((currentPack[bpIdxProd] == ""))
13181304 then nil
13191305 else split_4C(currentPack[bpIdxProd], "_")
1320- let $t04787847975 = craftGoodsCommon(matList, prodList, cont, productIdx, quantity)
1321- let newMat = $t04787847975._1
1322- let newProd = $t04787847975._2
1323- let matSpent = $t04787847975._3
1306+ let $t04743847535 = craftGoodsCommon(matList, prodList, cont, productIdx, quantity)
1307+ let newMat = $t04743847535._1
1308+ let newProd = $t04743847535._2
1309+ let matSpent = $t04743847535._3
13241310 let newPack = makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], makeString(newMat, "_"), makeString_2C(newProd, "_")], ":")
13251311 let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
13261312 let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpCraft, matSpent, MULT8)], nil))
13271313 $Tuple2(nil, $Tuple3(result, prologResult, statsResult))
13281314 }
13291315 }
13301316 }
13311317 else throw("Strict value is not equal to itself.")
13321318 }
13331319
13341320
13351321
13361322 @Callable(i)
1337-func craftGoodsDuckDelivery (productIdx,quantity,manufactoryContinent) = if (!(KS_ALLOW_DELIVERY))
1338- then throw("Delivery feature is turned off!")
1339- else {
1340- let prologResult = prolog()
1341- if ((prologResult == prologResult))
1342- then {
1343- let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
1344- if ((size(i.payments) != 1))
1345- then throw("exactly 1 payment must be attached")
1346- else {
1347- let pmt = i.payments[0]
1348- let amt = pmt.amount
1349- if (if (!(isDefined(pmt.assetId)))
1350- then true
1351- else (value(pmt.assetId) != usdtAssetId))
1352- then throw("USDT payments only!")
1353- else {
1354- let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
1355- let matList = split(currentPack[bpIdxMat], "_")
1356- let prodList = if ((currentPack[bpIdxProd] == ""))
1357- then nil
1358- else split_4C(currentPack[bpIdxProd], "_")
1359- let $t04920049313 = craftGoodsCommon(matList, prodList, manufactoryContinent, productIdx, quantity)
1360- let newMat = $t04920049313._1
1361- let newProd = $t04920049313._2
1362- let matSpent = $t04920049313._3
1363- let newPack = makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], makeString(newMat, "_"), makeString_2C(newProd, "_")], ":")
1364- let backpackResult = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
1365- let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpCraft, matSpent, MULT8)], nil))
1366- let feePart = fraction(quantity, MIN_USDT_FEE_DELIVERY, CRAFT_DELIVERY_COEFF)
1367- let fee = max([feePart, MIN_USDT_FEE_DELIVERY])
1368- let usdtSpentWithFee = (CRAFT_USDT_COST + fee)
1369- if ((usdtSpentWithFee > amt))
1370- then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(CRAFT_USDT_COST, 6)) + "+") + fixedPoint(fee, 6)) + "(delivery fee)"))
1371- else {
1372- let rest = if (((amt - usdtSpentWithFee) > 0))
1373- then [ScriptTransfer(i.caller, (amt - usdtSpentWithFee), usdtAssetId)]
1374- else nil
1375- let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1376- $Tuple2((rest :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))), $Tuple3(backpackResult, prologResult, statsResult))
1377- }
1378- }
1379- }
1380- }
1381- else throw("Strict value is not equal to itself.")
1382- }
1383-
1384-
1385-
1386-@Callable(i)
1387-func craftGoodsLandDelivery (productIdx,quantity,landAssetId,manufactoryContinent) = if (!(KS_ALLOW_DELIVERY))
1388- then throw("Delivery feature is turned off!")
1389- else {
1390- let prologResult = prolog()
1391- if ((prologResult == prologResult))
1392- then if ((size(i.payments) != 1))
1323+func craftGoodsDuckDelivery (productIdx,quantity,manufactoryContinent) = {
1324+ let prologResult = prolog()
1325+ if ((prologResult == prologResult))
1326+ then {
1327+ let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
1328+ if ((size(i.payments) != 1))
13931329 then throw("exactly 1 payment must be attached")
13941330 else {
13951331 let pmt = i.payments[0]
13961332 let amt = pmt.amount
13971333 if (if (!(isDefined(pmt.assetId)))
13981334 then true
13991335 else (value(pmt.assetId) != usdtAssetId))
14001336 then throw("USDT payments only!")
14011337 else {
1402- let user = i.caller
1403- let addr = toString(user)
1404- let asset = value(assetInfo(fromBase58String(landAssetId)))
1405- if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
1406- then throw((("NFT " + asset.name) + " is not staked"))
1338+ let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
1339+ let matList = split(currentPack[bpIdxMat], "_")
1340+ let prodList = if ((currentPack[bpIdxProd] == ""))
1341+ then nil
1342+ else split_4C(currentPack[bpIdxProd], "_")
1343+ let $t04868348796 = craftGoodsCommon(matList, prodList, manufactoryContinent, productIdx, quantity)
1344+ let newMat = $t04868348796._1
1345+ let newProd = $t04868348796._2
1346+ let matSpent = $t04868348796._3
1347+ let newPack = makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], makeString(newMat, "_"), makeString_2C(newProd, "_")], ":")
1348+ let backpackResult = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
1349+ let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpCraft, matSpent, MULT8)], nil))
1350+ let feePart = fraction(quantity, MIN_USDT_FEE_DELIVERY, CRAFT_DELIVERY_COEFF)
1351+ let fee = max([feePart, MIN_USDT_FEE_DELIVERY])
1352+ let usdtSpentWithFee = (CRAFT_USDT_COST + fee)
1353+ if ((usdtSpentWithFee > amt))
1354+ then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(CRAFT_USDT_COST, 6)) + "+") + fixedPoint(fee, 6)) + "(delivery fee)"))
14071355 else {
1408- let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
1409- if ((owner != addr))
1410- then throw((LANDPREFIX + " is not yours"))
1411- else {
1412- let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
1413- let currentWh = split_4C(wh, ":")
1414- let matList = split(currentWh[whIdxMat], "_")
1415- let prodList = if ((currentWh[whIdxProd] == ""))
1416- then nil
1417- else split_4C(currentWh[whIdxProd], "_")
1418- let $t05155651669 = craftGoodsCommon(matList, prodList, manufactoryContinent, productIdx, quantity)
1419- let newMat = $t05155651669._1
1420- let newProd = $t05155651669._2
1421- let matSpent = $t05155651669._3
1422- let whStr = makeString_2C([currentWh[whIdxLevels], currentWh[whIdxRes], makeString(newMat, "_"), makeString_2C(newProd, "_"), currentWh[whIdxLOFT]], ":")
1423- let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil))
1424- let statsResult = asInt(invoke(stakingContract, "updateAccStats", [addr, fraction(xpCraft, matSpent, MULT8)], nil))
1425- let feePart = fraction(quantity, MIN_USDT_FEE_DELIVERY, CRAFT_DELIVERY_COEFF)
1426- let fee = max([feePart, MIN_USDT_FEE_DELIVERY])
1427- let usdtSpentWithFee = (CRAFT_USDT_COST + fee)
1428- if ((usdtSpentWithFee > amt))
1429- then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(CRAFT_USDT_COST, 6)) + "+") + fixedPoint(fee, 6)) + "(delivery fee)"))
1430- else {
1431- let rest = if (((amt - usdtSpentWithFee) > 0))
1432- then [ScriptTransfer(i.caller, (amt - usdtSpentWithFee), usdtAssetId)]
1433- else nil
1434- let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1435- $Tuple2((rest :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))), $Tuple3(whSave, prologResult, statsResult))
1436- }
1437- }
1356+ let rest = if (((amt - usdtSpentWithFee) > 0))
1357+ then [ScriptTransfer(i.caller, (amt - usdtSpentWithFee), usdtAssetId)]
1358+ else nil
1359+ let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1360+ $Tuple2((rest :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))), $Tuple3(backpackResult, prologResult, statsResult))
14381361 }
14391362 }
14401363 }
1441- else throw("Strict value is not equal to itself.")
1442- }
1364+ }
1365+ else throw("Strict value is not equal to itself.")
1366+ }
1367+
1368+
1369+
1370+@Callable(i)
1371+func craftGoodsLandDelivery (productIdx,quantity,landAssetId,manufactoryContinent) = {
1372+ let prologResult = prolog()
1373+ if ((prologResult == prologResult))
1374+ then if ((size(i.payments) != 1))
1375+ then throw("exactly 1 payment must be attached")
1376+ else {
1377+ let pmt = i.payments[0]
1378+ let amt = pmt.amount
1379+ if (if (!(isDefined(pmt.assetId)))
1380+ then true
1381+ else (value(pmt.assetId) != usdtAssetId))
1382+ then throw("USDT payments only!")
1383+ else {
1384+ let user = i.caller
1385+ let addr = toString(user)
1386+ let asset = value(assetInfo(fromBase58String(landAssetId)))
1387+ if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
1388+ then throw((("NFT " + asset.name) + " is not staked"))
1389+ else {
1390+ let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
1391+ if ((owner != addr))
1392+ then throw((LANDPREFIX + " is not yours"))
1393+ else {
1394+ let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
1395+ let currentWh = split_4C(wh, ":")
1396+ let matList = split(currentWh[whIdxMat], "_")
1397+ let prodList = if ((currentWh[whIdxProd] == ""))
1398+ then nil
1399+ else split_4C(currentWh[whIdxProd], "_")
1400+ let $t05096251075 = craftGoodsCommon(matList, prodList, manufactoryContinent, productIdx, quantity)
1401+ let newMat = $t05096251075._1
1402+ let newProd = $t05096251075._2
1403+ let matSpent = $t05096251075._3
1404+ let whStr = makeString_2C([currentWh[whIdxLevels], currentWh[whIdxRes], makeString(newMat, "_"), makeString_2C(newProd, "_"), currentWh[whIdxLOFT]], ":")
1405+ let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil))
1406+ let statsResult = asInt(invoke(stakingContract, "updateAccStats", [addr, fraction(xpCraft, matSpent, MULT8)], nil))
1407+ let feePart = fraction(quantity, MIN_USDT_FEE_DELIVERY, CRAFT_DELIVERY_COEFF)
1408+ let fee = max([feePart, MIN_USDT_FEE_DELIVERY])
1409+ let usdtSpentWithFee = (CRAFT_USDT_COST + fee)
1410+ if ((usdtSpentWithFee > amt))
1411+ then throw((((((("Insufficient payment! Attached=" + fixedPoint(amt, 6)) + ", required=") + fixedPoint(CRAFT_USDT_COST, 6)) + "+") + fixedPoint(fee, 6)) + "(delivery fee)"))
1412+ else {
1413+ let rest = if (((amt - usdtSpentWithFee) > 0))
1414+ then [ScriptTransfer(i.caller, (amt - usdtSpentWithFee), usdtAssetId)]
1415+ else nil
1416+ let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1417+ $Tuple2((rest :+ IntegerEntry(deliveryFundKey, (fundTotal + fee))), $Tuple3(whSave, prologResult, statsResult))
1418+ }
1419+ }
1420+ }
1421+ }
1422+ }
1423+ else throw("Strict value is not equal to itself.")
1424+ }
14431425
14441426
14451427
14461428 @Callable(i)
14471429 func setWarehouseOrder (newOrderStr,landAssetId) = {
14481430 let user = i.originCaller
14491431 let addr = toString(user)
14501432 let result = if ((user != restContract))
14511433 then checkBlocked()
14521434 else false
14531435 let asset = value(assetInfo(fromBase58String(landAssetId)))
14541436 if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
14551437 then throw((("NFT " + asset.name) + " is not staked"))
14561438 else {
14571439 let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
14581440 if (if ((user != restContract))
14591441 then (owner != addr)
14601442 else false)
14611443 then throw((LANDPREFIX + " is not yours"))
14621444 else {
14631445 let newOrder = split_4C(newOrderStr, ":")
14641446 let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
14651447 let currentWh = split_4C(wh, ":")
14661448 let loft = split(currentWh[whIdxLOFT], "_")
14671449 let whTotal = parseIntValue(loft[volTotal])
14681450 let ordKey = keyOrderByLand(landAssetId)
14691451 let currentOrd = getOrder(ordKey)
14701452 let z = setInternal(currentWh, currentOrd, newOrder)
14711453 let buyVolSaldo = z._4
14721454 let sellVolSaldo = z._5
14731455 let whOccupied = z._7
14741456 let whLocked = (buyVolSaldo + sellVolSaldo)
14751457 let whFree = ((whTotal - whOccupied) - whLocked)
14761458 if ((0 > whFree))
14771459 then throw((((((("Attempt to reserve " + toString(buyVolSaldo)) + " space for buy orders, and ") + toString(sellVolSaldo)) + " space for sell orders (and occupied=") + toString(whOccupied)) + "), leads to negative free space"))
14781460 else {
14791461 let whStr = makeString_2C([currentWh[whIdxLevels], makeString(z._1, "_"), makeString(z._2, "_"), makeString_2C(z._3, "_"), toString(whLocked)], ":")
14801462 let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil))
14811463 let usdSaldo = z._6
14821464 let actions = if ((usdSaldo > 0))
14831465 then if ((size(i.payments) != 1))
14841466 then throw("exactly 1 payment must be attached")
14851467 else {
14861468 let pmt = i.payments[0]
14871469 let amt = pmt.amount
14881470 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
14891471 if ((pmtAssetId != usdtAssetId))
14901472 then throw("USDT payments only!")
14911473 else if ((amt != usdSaldo))
14921474 then throw(("Payment needed is " + toString(usdSaldo)))
14931475 else [StringEntry(ordKey, newOrderStr)]
14941476 }
14951477 else if ((usdSaldo == 0))
14961478 then if ((size(i.payments) != 0))
14971479 then throw("No payments needed")
14981480 else [StringEntry(ordKey, newOrderStr)]
14991481 else if ((size(i.payments) != 0))
15001482 then throw("No payments needed")
15011483 else [ScriptTransfer(addressFromStringValue(owner), -(usdSaldo), usdtAssetId), StringEntry(ordKey, newOrderStr)]
15021484 $Tuple2(actions, $Tuple2(result, whSave))
15031485 }
15041486 }
15051487 }
15061488 }
15071489
15081490
15091491
15101492 @Callable(i)
15111493 func acceptWarehouseOrder (bpOrderStr,shopLandAssetId,duckAssetId) = {
15121494 let prologResult = prolog()
15131495 if ((prologResult == prologResult))
15141496 then {
15151497 let caller = i.originCaller
15161498 let callerAddr = toString(caller)
15171499 let stakedDuckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(callerAddr)), "You don't have a duck staked")
15181500 let curLocation = valueOrElse(getString(stakingContract, keyDuckLocation(stakedDuckAssetId)), DEFAULTLOCATION)
15191501 let loc = split(value(curLocation), "_")
15201502 if ((loc[locIdxType] != "L"))
15211503 then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L"))
15221504 else if ((stakedDuckAssetId != duckAssetId))
15231505 then throw(((("Your staked duck is " + stakedDuckAssetId) + ", but passed ") + duckAssetId))
15241506 else {
15251507 let bpKey = keyBackpackByDuck(duckAssetId)
15261508 let currentPack = getBackpack(bpKey)
15271509 let bpResList = split(currentPack[bpIdxRes], "_")
15281510 let bpMatList = split(currentPack[bpIdxMat], "_")
15291511 let bpProdList = if ((currentPack[bpIdxProd] == ""))
15301512 then nil
15311513 else split_4C(currentPack[bpIdxProd], "_")
1532- let $t05758257822 = acceptShopOrderCommon(shopLandAssetId, callerAddr, bpOrderStr, bpResList, bpMatList, bpProdList)
1533- let shopAction = $t05758257822._1
1534- let newUserRes = $t05758257822._2
1535- let newUserMat = $t05758257822._3
1536- let newUserProd = $t05758257822._4
1537- let usdWh2BpSaldo = $t05758257822._5
1538- let usdBp2WhSaldo = $t05758257822._6
1539- let xpAmount = $t05758257822._7
1540- let shopLandOwner = $t05758257822._8
1541- let shopWhSave = $t05758257822._9
1542- let accStatsResult = $t05758257822._10
1514+ let $t05698857228 = acceptShopOrderCommon(shopLandAssetId, callerAddr, bpOrderStr, bpResList, bpMatList, bpProdList)
1515+ let shopAction = $t05698857228._1
1516+ let newUserRes = $t05698857228._2
1517+ let newUserMat = $t05698857228._3
1518+ let newUserProd = $t05698857228._4
1519+ let usdWh2BpSaldo = $t05698857228._5
1520+ let usdBp2WhSaldo = $t05698857228._6
1521+ let xpAmount = $t05698857228._7
1522+ let shopLandOwner = $t05698857228._8
1523+ let shopWhSave = $t05698857228._9
1524+ let accStatsResult = $t05698857228._10
15431525 let actions1 = [shopAction, shop2userActions(usdWh2BpSaldo, callerAddr, 0)]
15441526 let actions2 = user2shopActions(usdBp2WhSaldo, i.payments, shopLandOwner, 0)
15451527 let newBpStr = makeString_2C([currentPack[bpIdxLevel], makeString(newUserRes, "_"), makeString(newUserMat, "_"), makeString_2C(newUserProd, "_")], ":")
15461528 let bpSave = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil))
15471529 let duckStatsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpShop, xpAmount, MULT8)], nil))
15481530 $Tuple2((actions1 ++ actions2), $Tuple5(prologResult, shopWhSave, bpSave, duckStatsResult, accStatsResult))
15491531 }
15501532 }
15511533 else throw("Strict value is not equal to itself.")
15521534 }
15531535
15541536
15551537
15561538 @Callable(i)
1557-func acceptShopOrderDuckDelivery (orderStr,shopLandAssetId) = if (!(KS_ALLOW_DELIVERY))
1558- then throw("Delivery feature is turned off!")
1559- else {
1560- let prologResult = prolog()
1561- if ((prologResult == prologResult))
1562- then {
1563- let caller = i.originCaller
1564- let callerAddr = toString(caller)
1565- let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(callerAddr)), "You don't have a duck staked")
1566- let bpKey = keyBackpackByDuck(duckAssetId)
1567- let currentPack = getBackpack(bpKey)
1568- let bpResList = split(currentPack[bpIdxRes], "_")
1569- let bpMatList = split(currentPack[bpIdxMat], "_")
1570- let bpProdList = if ((currentPack[bpIdxProd] == ""))
1571- then nil
1572- else split_4C(currentPack[bpIdxProd], "_")
1573- let $t05926459502 = acceptShopOrderCommon(shopLandAssetId, callerAddr, orderStr, bpResList, bpMatList, bpProdList)
1574- let shopAction = $t05926459502._1
1575- let newUserRes = $t05926459502._2
1576- let newUserMat = $t05926459502._3
1577- let newUserProd = $t05926459502._4
1578- let usdWh2BpSaldo = $t05926459502._5
1579- let usdBp2WhSaldo = $t05926459502._6
1580- let xpAmount = $t05926459502._7
1581- let shopLandOwner = $t05926459502._8
1582- let shopWhSave = $t05926459502._9
1583- let accStatsResult = $t05926459502._10
1584- let deliveryFeePart = fraction((usdBp2WhSaldo + usdWh2BpSaldo), DELIVERY_FEE, MULT6)
1585- let deliveryFee = max([deliveryFeePart, MIN_USDT_FEE_DELIVERY])
1586- let spentFee = fraction(deliveryFee, usdBp2WhSaldo, (usdBp2WhSaldo + usdWh2BpSaldo))
1587- let receivedFee = (deliveryFee - spentFee)
1588- let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1589- let actions1 = [shopAction, shop2userActions(usdWh2BpSaldo, callerAddr, receivedFee)]
1590- let actions2 = user2shopActions(usdBp2WhSaldo, i.payments, shopLandOwner, spentFee)
1591- let newBpStr = makeString_2C([currentPack[bpIdxLevel], makeString(newUserRes, "_"), makeString(newUserMat, "_"), makeString_2C(newUserProd, "_")], ":")
1592- let bpSave = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil))
1593- let duckStatsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpShop, xpAmount, MULT8)], nil))
1594- $Tuple2(((actions1 ++ actions2) :+ IntegerEntry(deliveryFundKey, (fundTotal + deliveryFee))), $Tuple5(prologResult, shopWhSave, bpSave, duckStatsResult, accStatsResult))
1595- }
1596- else throw("Strict value is not equal to itself.")
1597- }
1539+func acceptShopOrderDuckDelivery (orderStr,shopLandAssetId) = {
1540+ let prologResult = prolog()
1541+ if ((prologResult == prologResult))
1542+ then {
1543+ let caller = i.originCaller
1544+ let callerAddr = toString(caller)
1545+ let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(callerAddr)), "You don't have a duck staked")
1546+ let bpKey = keyBackpackByDuck(duckAssetId)
1547+ let currentPack = getBackpack(bpKey)
1548+ let bpResList = split(currentPack[bpIdxRes], "_")
1549+ let bpMatList = split(currentPack[bpIdxMat], "_")
1550+ let bpProdList = if ((currentPack[bpIdxProd] == ""))
1551+ then nil
1552+ else split_4C(currentPack[bpIdxProd], "_")
1553+ let $t05859358831 = acceptShopOrderCommon(shopLandAssetId, callerAddr, orderStr, bpResList, bpMatList, bpProdList)
1554+ let shopAction = $t05859358831._1
1555+ let newUserRes = $t05859358831._2
1556+ let newUserMat = $t05859358831._3
1557+ let newUserProd = $t05859358831._4
1558+ let usdWh2BpSaldo = $t05859358831._5
1559+ let usdBp2WhSaldo = $t05859358831._6
1560+ let xpAmount = $t05859358831._7
1561+ let shopLandOwner = $t05859358831._8
1562+ let shopWhSave = $t05859358831._9
1563+ let accStatsResult = $t05859358831._10
1564+ let deliveryFeePart = fraction((usdBp2WhSaldo + usdWh2BpSaldo), DELIVERY_FEE, MULT6)
1565+ let deliveryFee = max([deliveryFeePart, MIN_USDT_FEE_DELIVERY])
1566+ let spentFee = fraction(deliveryFee, usdBp2WhSaldo, (usdBp2WhSaldo + usdWh2BpSaldo))
1567+ let receivedFee = (deliveryFee - spentFee)
1568+ let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1569+ let actions1 = [shopAction, shop2userActions(usdWh2BpSaldo, callerAddr, receivedFee)]
1570+ let actions2 = user2shopActions(usdBp2WhSaldo, i.payments, shopLandOwner, spentFee)
1571+ let newBpStr = makeString_2C([currentPack[bpIdxLevel], makeString(newUserRes, "_"), makeString(newUserMat, "_"), makeString_2C(newUserProd, "_")], ":")
1572+ let bpSave = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil))
1573+ let duckStatsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpShop, xpAmount, MULT8)], nil))
1574+ $Tuple2(((actions1 ++ actions2) :+ IntegerEntry(deliveryFundKey, (fundTotal + deliveryFee))), $Tuple5(prologResult, shopWhSave, bpSave, duckStatsResult, accStatsResult))
1575+ }
1576+ else throw("Strict value is not equal to itself.")
1577+ }
15981578
15991579
16001580
16011581 @Callable(i)
1602-func acceptShopOrderLandDelivery (orderStr,shopLandAssetId,myLandAssetId) = if (!(KS_ALLOW_DELIVERY))
1603- then throw("Delivery feature is turned off!")
1604- else {
1605- let prologResult = prolog()
1606- if ((prologResult == prologResult))
1607- then {
1608- let caller = i.originCaller
1609- let callerAddr = toString(caller)
1610- let asset = value(assetInfo(fromBase58String(myLandAssetId)))
1611- if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(myLandAssetId)))))
1612- then throw((("NFT " + asset.name) + " is not staked"))
1613- else {
1614- let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(myLandAssetId)), (("NFT " + asset.name) + " is orphaned"))
1615- if ((owner != callerAddr))
1616- then throw((LANDPREFIX + " is not yours"))
1617- else {
1618- let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [myLandAssetId], nil))
1619- let currentWh = split_4C(wh, ":")
1620- let resList = split(currentWh[whIdxRes], "_")
1621- let matList = split(currentWh[whIdxMat], "_")
1622- let prodList = if ((currentWh[whIdxProd] == ""))
1623- then nil
1624- else split_4C(currentWh[whIdxProd], "_")
1625- let $t06170061932 = acceptShopOrderCommon(shopLandAssetId, callerAddr, orderStr, resList, matList, prodList)
1626- let shopAction = $t06170061932._1
1627- let newUserRes = $t06170061932._2
1628- let newUserMat = $t06170061932._3
1629- let newUserProd = $t06170061932._4
1630- let usdWh2BpSaldo = $t06170061932._5
1631- let usdBp2WhSaldo = $t06170061932._6
1632- let xpAmount = $t06170061932._7
1633- let shopLandOwner = $t06170061932._8
1634- let shopWhSave = $t06170061932._9
1635- let accStatsResult = $t06170061932._10
1636- let deliveryFeePart = fraction((usdBp2WhSaldo + usdWh2BpSaldo), DELIVERY_FEE, MULT6)
1637- let deliveryFee = max([deliveryFeePart, MIN_USDT_FEE_DELIVERY])
1638- let spentFee = fraction(deliveryFee, usdBp2WhSaldo, (usdBp2WhSaldo + usdWh2BpSaldo))
1639- let receivedFee = (deliveryFee - spentFee)
1640- let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1641- let actions1 = [shopAction, shop2userActions(usdWh2BpSaldo, callerAddr, receivedFee)]
1642- let actions2 = user2shopActions(usdBp2WhSaldo, i.payments, shopLandOwner, spentFee)
1643- let whStr = makeString_2C([currentWh[whIdxLevels], makeString(newUserRes, "_"), makeString(newUserMat, "_"), makeString(newUserProd, "_"), currentWh[whIdxLOFT]], ":")
1644- let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, myLandAssetId], nil))
1645- let statsResult = asInt(invoke(stakingContract, "updateAccStats", [callerAddr, fraction(xpShop, xpAmount, MULT8)], nil))
1646- $Tuple2(((actions1 ++ actions2) :+ IntegerEntry(deliveryFundKey, (fundTotal + deliveryFee))), $Tuple5(prologResult, shopWhSave, whSave, statsResult, accStatsResult))
1647- }
1648- }
1649- }
1650- else throw("Strict value is not equal to itself.")
1651- }
1582+func acceptShopOrderLandDelivery (orderStr,shopLandAssetId,myLandAssetId) = {
1583+ let prologResult = prolog()
1584+ if ((prologResult == prologResult))
1585+ then {
1586+ let caller = i.originCaller
1587+ let callerAddr = toString(caller)
1588+ let asset = value(assetInfo(fromBase58String(myLandAssetId)))
1589+ if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(myLandAssetId)))))
1590+ then throw((("NFT " + asset.name) + " is not staked"))
1591+ else {
1592+ let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(myLandAssetId)), (("NFT " + asset.name) + " is orphaned"))
1593+ if ((owner != callerAddr))
1594+ then throw((LANDPREFIX + " is not yours"))
1595+ else {
1596+ let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [myLandAssetId], nil))
1597+ let currentWh = split_4C(wh, ":")
1598+ let resList = split(currentWh[whIdxRes], "_")
1599+ let matList = split(currentWh[whIdxMat], "_")
1600+ let prodList = if ((currentWh[whIdxProd] == ""))
1601+ then nil
1602+ else split_4C(currentWh[whIdxProd], "_")
1603+ let $t06095261184 = acceptShopOrderCommon(shopLandAssetId, callerAddr, orderStr, resList, matList, prodList)
1604+ let shopAction = $t06095261184._1
1605+ let newUserRes = $t06095261184._2
1606+ let newUserMat = $t06095261184._3
1607+ let newUserProd = $t06095261184._4
1608+ let usdWh2BpSaldo = $t06095261184._5
1609+ let usdBp2WhSaldo = $t06095261184._6
1610+ let xpAmount = $t06095261184._7
1611+ let shopLandOwner = $t06095261184._8
1612+ let shopWhSave = $t06095261184._9
1613+ let accStatsResult = $t06095261184._10
1614+ let deliveryFeePart = fraction((usdBp2WhSaldo + usdWh2BpSaldo), DELIVERY_FEE, MULT6)
1615+ let deliveryFee = max([deliveryFeePart, MIN_USDT_FEE_DELIVERY])
1616+ let spentFee = fraction(deliveryFee, usdBp2WhSaldo, (usdBp2WhSaldo + usdWh2BpSaldo))
1617+ let receivedFee = (deliveryFee - spentFee)
1618+ let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
1619+ let actions1 = [shopAction, shop2userActions(usdWh2BpSaldo, callerAddr, receivedFee)]
1620+ let actions2 = user2shopActions(usdBp2WhSaldo, i.payments, shopLandOwner, spentFee)
1621+ let whStr = makeString_2C([currentWh[whIdxLevels], makeString(newUserRes, "_"), makeString(newUserMat, "_"), makeString(newUserProd, "_"), currentWh[whIdxLOFT]], ":")
1622+ let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, myLandAssetId], nil))
1623+ let statsResult = asInt(invoke(stakingContract, "updateAccStats", [callerAddr, fraction(xpShop, xpAmount, MULT8)], nil))
1624+ $Tuple2(((actions1 ++ actions2) :+ IntegerEntry(deliveryFundKey, (fundTotal + deliveryFee))), $Tuple5(prologResult, shopWhSave, whSave, statsResult, accStatsResult))
1625+ }
1626+ }
1627+ }
1628+ else throw("Strict value is not equal to itself.")
1629+ }
16521630
16531631
16541632
16551633 @Callable(i)
16561634 func sellProductsToES (amounts) = {
16571635 let prologResult = prolog()
16581636 if ((prologResult == prologResult))
16591637 then if ((size(i.payments) != 0))
16601638 then throw("No payments needed")
16611639 else {
16621640 let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
16631641 let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_")
16641642 if ((curLocation[locIdxType] != "A"))
16651643 then throw(("Duck location type should be Airport, but is " + curLocation[locIdxType]))
16661644 else {
16671645 let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
16681646 let prodList = if ((currentPack[bpIdxProd] == ""))
16691647 then nil
16701648 else split_4C(currentPack[bpIdxProd], "_")
16711649 let esKey = keyEsWarehouse()
16721650 let existStr = getString(esKey)
16731651 let existAmounts = if (isDefined(existStr))
16741652 then split_4C(value(existStr), "_")
16751653 else nil
16761654 func moveProd (acc,recipeStr) = {
16771655 let j = acc._1
16781656 let quantity = if ((size(amounts) > j))
16791657 then amounts[j]
16801658 else 0
16811659 if ((0 > quantity))
16821660 then throw("Quantity cannot be negative")
16831661 else {
16841662 let recipe = split(recipeStr, "_")
16851663 if ((size(recipe) != RECIPESIZE))
16861664 then throw(("Fatal: unknown recipe: " + recipeStr))
16871665 else {
16881666 let maxAmount = (ESMAXPACKAGES * PRODUCTPKGSIZE)
16891667 let existAmount = if ((size(existAmounts) > j))
16901668 then parseIntValue(existAmounts[j])
16911669 else 0
16921670 let canBuy = (maxAmount - existAmount)
16931671 if ((quantity > canBuy))
16941672 then throw(((("Warehouse can buy only " + toString(canBuy)) + " of ") + prodTypes[j]))
16951673 else {
16961674 let totalMat = getRecipeMaterials(recipe)
16971675 let unitPrice = fraction((totalMat * ESBUYCOEF), RESOURCEPRICEMIN, (MULT8 * PRODUCTPKGSIZE))
16981676 let bpProdAmount = if ((size(prodList) > j))
16991677 then parseIntValue(prodList[j])
17001678 else 0
17011679 if ((quantity > bpProdAmount))
17021680 then throw(((("You have only " + toString(bpProdAmount)) + " of ") + prodTypes[j]))
17031681 else $Tuple5((j + 1), (acc._2 + (unitPrice * quantity)), (acc._3 :+ toString((bpProdAmount - quantity))), (acc._4 :+ toString((existAmount + quantity))), (acc._5 + (totalMat * quantity)))
17041682 }
17051683 }
17061684 }
17071685 }
17081686
17091687 let merged = {
17101688 let $l = productionMatrix
17111689 let $s = size($l)
17121690 let $acc0 = $Tuple5(0, 0, nil, nil, 0)
17131691 func $f0_1 ($a,$i) = if (($i >= $s))
17141692 then $a
17151693 else moveProd($a, $l[$i])
17161694
17171695 func $f0_2 ($a,$i) = if (($i >= $s))
17181696 then $a
17191697 else throw("List size exceeds 50")
17201698
17211699 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50)
17221700 }
17231701 let newBpStr = makeString_2C([currentPack[bpIdxLevel], currentPack[bpIdxRes], currentPack[bpIdxMat], makeString_2C(merged._3, "_")], ":")
17241702 let bpSave = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil))
17251703 let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpSellToEs, merged._5, (MULT8 * 10))], nil))
17261704 $Tuple2([StringEntry(esKey, makeString_2C(merged._4, "_")), ScriptTransfer(i.caller, merged._2, usdtAssetId)], $Tuple3(bpSave, prologResult, statsResult))
17271705 }
17281706 }
17291707 else throw("Strict value is not equal to itself.")
17301708 }
17311709
17321710
17331711
17341712 @Callable(i)
17351713 func updateEsStorage (newStorage) = if ((i.caller != stakingContract))
17361714 then throw("Permission denied")
17371715 else $Tuple2([StringEntry(keyEsWarehouse(), newStorage)], newStorage)
17381716
17391717
17401718
17411719 @Callable(i)
17421720 func updateDeliveryLocked (newAmount) = if ((i.caller != stakingContract))
17431721 then throw("Permission denied")
17441722 else $Tuple2([IntegerEntry(deliveryLockedKey, newAmount)], newAmount)
17451723
17461724
17471725
17481726 @Callable(i)
17491727 func sendDeliveryReward (addr) = if ((i.caller != stakingContract))
17501728 then throw("Permission denied")
17511729 else {
17521730 let fundTotal = valueOrElse(getInteger(deliveryFundKey), 0)
17531731 let lockedTotal = valueOrElse(getInteger(deliveryLockedKey), 0)
17541732 let acresAmount = (MIN_USDT_FEE_DELIVERY * USDT2ACRES_MULTIPLIER)
17551733 let acresResult = invoke(acresContract, "sendAcres", [addr, acresAmount], nil)
17561734 $Tuple2([IntegerEntry(deliveryFundKey, (fundTotal - MIN_USDT_FEE_DELIVERY)), IntegerEntry(deliveryLockedKey, (lockedTotal - MIN_USDT_FEE_DELIVERY))], acresResult)
17571735 }
17581736
17591737

github/deemru/w8io/169f3d6 
221.39 ms