tx · DEU9fPpELAfp5H38q1oq25mYUi2qXvai1k6Dh17spPJB 3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep: -0.03400000 Waves 2023.06.08 00:23 [2612775] smart account 3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep > SELF 0.00000000 Waves
{ "type": 13, "id": "DEU9fPpELAfp5H38q1oq25mYUi2qXvai1k6Dh17spPJB", "fee": 3400000, "feeAssetId": null, "timestamp": 1686172975229, "version": 2, "chainId": 84, "sender": "3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep", "senderPublicKey": "7v5L7QkXxfkirALdyqmox38QCsa9jtfAtgUfHTh34eWq", "proofs": [ "39rSBALdd7CNw5apLgkVKxodUbGyP3XcMxpnt9uDZDAokNWY7pUrfBMw7A8QdKvxacQZ23anHpzeyUGJHaRHsWLU" ], "script": "base64:BgI2CAISBAoCCBgSAwoBCBIECgIRERIECgIRERIDCgEREgQKAgEBEgQKAggIEgUKAwgICBIDCgERSQAFY2hhaW4JAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEAC3VzZHRBc3NldElkBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwASCE2nqyCAM/TtG7yo7ui5O8yYLdC136B5ao1CP5qA//uQMJAAACAQFUBQckbWF0Y2gwASBVsdifcoeC7+XjW42sBatl3ppDoS8WuwXzGreHpfHFGAkAAgECDVVua25vd24gY2hhaW4AFWRlZmF1bHRSZXN0QWRkcmVzc1N0cgQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAIjM1BRQ3V2RmJ2aDRMa1BVbnJuVTF6M2puYkExcDltM1dOaHYDCQAAAgEBVAUHJG1hdGNoMAIjM011bWtHR3p0Q0tBWHBXRHF4a2Rkb2ZxWFNVYnFRa3ZTSnkJAAIBAg1Vbmtub3duIGNoYWluAANTRVACAl9fAAVNVUxUNgDAhD0ABU1VTFQ3AICt4gQABU1VTFQ4AIDC1y8ABk1VTFQxMACAyK+gJQ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x1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAfB5TV", "height": 2612775, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9E2YaNHti7NdxAVtxGr3eG7MzovE3Q9HKxS9yiQvJuHH Next: HNzebDxwYnW3WDuwBreDRkRXoTFHUfYcKxfn1tvz476D Diff:
Old | New | Differences | |
---|---|---|---|
128 | 128 | func keyOrderByLand (landAssetId) = ("landOrder_" + landAssetId) | |
129 | 129 | ||
130 | 130 | ||
131 | - | func | |
131 | + | func keyDutyWarehouse () = "dutyWarehouseProducts" | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | let locIdxContinent = 0 | |
943 | 943 | ||
944 | 944 | ||
945 | 945 | @Callable(i) | |
946 | - | func | |
947 | - | | |
948 | - | | |
949 | - | | |
950 | - | | |
951 | - | | |
952 | - | then throw(" | |
946 | + | func sellProductsToDutyFree (amounts) = if ((i.caller != this)) | |
947 | + | then throw("Permission denied") | |
948 | + | else { | |
949 | + | let blocked = checkBlocked() | |
950 | + | if ((blocked == blocked)) | |
951 | + | then if ((size(i.payments) != 0)) | |
952 | + | then throw("No payments needed") | |
953 | 953 | else { | |
954 | 954 | let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
955 | 955 | let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_") | |
957 | 957 | then throw(("Duck location type should be Airport, but is " + curLocation[locIdxType])) | |
958 | 958 | else { | |
959 | 959 | let currentPack = getBackpack(keyBackpackByDuck(duckAssetId)) | |
960 | - | if ((productIdx != 0)) | |
961 | - | then throw("Unsupported product") | |
962 | - | else { | |
963 | - | let recipe = split(productionMatrix[productIdx], "_") | |
964 | - | if ((size(recipe) != (NUMRES + 3))) | |
965 | - | then throw(("Fatal: unknown recipe: " + productionMatrix[productIdx])) | |
966 | - | else { | |
967 | - | let packSize = parseIntValue(recipe[recipeIdxPacksize]) | |
968 | - | let maxAmount = (DUTYMAXPACKAGES * packSize) | |
969 | - | let dutyKey = keyDutyWarehouseByType(productIdx) | |
970 | - | let existAmount = valueOrElse(getInteger(dutyKey), 0) | |
971 | - | let canBuy = (maxAmount - existAmount) | |
972 | - | if ((quantity > canBuy)) | |
973 | - | then throw(((("Warehouse can buy only " + toString(canBuy)) + " of ") + prodTypes[productIdx])) | |
974 | - | else { | |
975 | - | func addMat (acc,j) = (acc + parseIntValue(recipe[j])) | |
960 | + | let prodList = if ((currentPack[bpIdxProd] == "")) | |
961 | + | then nil | |
962 | + | else split(currentPack[bpIdxProd], "_") | |
963 | + | let dutyKey = keyDutyWarehouse() | |
964 | + | let existStr = getString(dutyKey) | |
965 | + | let existAmounts = if (isDefined(existStr)) | |
966 | + | then split(value(existStr), "_") | |
967 | + | else nil | |
968 | + | func moveProd (acc,recipeStr) = { | |
969 | + | let j = acc._1 | |
970 | + | let quantity = if ((size(amounts) > j)) | |
971 | + | then amounts[j] | |
972 | + | else 0 | |
973 | + | if ((0 > quantity)) | |
974 | + | then throw("Quantity cannot be negative") | |
975 | + | else { | |
976 | + | let recipe = split(recipeStr, "_") | |
977 | + | if ((size(recipe) != (NUMRES + 3))) | |
978 | + | then throw(("Fatal: unknown recipe: " + recipeStr)) | |
979 | + | else { | |
980 | + | let packSize = parseIntValue(recipe[recipeIdxPacksize]) | |
981 | + | let maxAmount = (DUTYMAXPACKAGES * packSize) | |
982 | + | let existAmount = if ((size(existAmounts) > j)) | |
983 | + | then parseIntValue(existAmounts[j]) | |
984 | + | else 0 | |
985 | + | let canBuy = (maxAmount - existAmount) | |
986 | + | if ((quantity > canBuy)) | |
987 | + | then throw(((("Warehouse can buy only " + toString(canBuy)) + " of ") + prodTypes[j])) | |
988 | + | else { | |
989 | + | func addMat (acc,m) = (acc + parseIntValue(recipe[m])) | |
976 | 990 | ||
977 | - | let totalMat = { | |
978 | - | let $l = [0, 1, 2, 3, 4, 5] | |
979 | - | let $s = size($l) | |
980 | - | let $acc0 = 0 | |
981 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
982 | - | then $a | |
983 | - | else addMat($a, $l[$i]) | |
991 | + | let totalMat = { | |
992 | + | let $l = [0, 1, 2, 3, 4, 5] | |
993 | + | let $s = size($l) | |
994 | + | let $acc0 = 0 | |
995 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
996 | + | then $a | |
997 | + | else addMat($a, $l[$i]) | |
984 | 998 | ||
985 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
986 | - | then $a | |
987 | - | else throw("List size exceeds 6") | |
999 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1000 | + | then $a | |
1001 | + | else throw("List size exceeds 6") | |
988 | 1002 | ||
989 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
1003 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
1004 | + | } | |
1005 | + | let unitPrice = fraction((totalMat * DUTYBUYCOEF), RESOURCEPRICEMIN, (packSize * 10)) | |
1006 | + | let bpProdAmount = if ((size(prodList) > j)) | |
1007 | + | then parseIntValue(prodList[j]) | |
1008 | + | else 0 | |
1009 | + | if ((quantity > bpProdAmount)) | |
1010 | + | then throw(((("You have only " + toString(bpProdAmount)) + " of ") + prodTypes[j])) | |
1011 | + | else $Tuple4((j + 1), (acc._2 + (unitPrice * quantity)), (acc._3 :+ toString((bpProdAmount - quantity))), (acc._4 :+ toString((existAmount + quantity)))) | |
990 | 1012 | } | |
991 | - | let unitPrice = fraction((totalMat * DUTYBUYCOEF), RESOURCEPRICEMIN, (packSize * 10)) | |
992 | - | let prodList = if ((currentPack[bpIdxProd] == "")) | |
993 | - | then nil | |
994 | - | else split(currentPack[bpIdxProd], "_") | |
995 | - | let bpProdAmount = if ((size(prodList) > productIdx)) | |
996 | - | then parseIntValue(prodList[productIdx]) | |
997 | - | else 0 | |
998 | - | if ((quantity > bpProdAmount)) | |
999 | - | then throw(((("You have only " + toString(bpProdAmount)) + " of ") + prodTypes[productIdx])) | |
1000 | - | else { | |
1001 | - | func subtractProd (acc,ignoredItem) = { | |
1002 | - | let n = acc._2 | |
1003 | - | let x = if ((size(prodList) > n)) | |
1004 | - | then parseIntValue(prodList[n]) | |
1005 | - | else 0 | |
1006 | - | let y = toString(if ((n == productIdx)) | |
1007 | - | then (x - quantity) | |
1008 | - | else x) | |
1009 | - | $Tuple2((acc._1 :+ y), (n + 1)) | |
1010 | - | } | |
1013 | + | } | |
1014 | + | } | |
1015 | + | } | |
1011 | 1016 | ||
1012 | - | let newProdList = ( let $l = productionMatrix | |
1013 | - | let $s = size($l) | |
1014 | - | let $acc0 = $Tuple2(nil, 0) | |
1015 | - | func $f1_1 ($a,$i) = if (($i >= $s)) | |
1016 | - | then $a | |
1017 | - | else subtractProd($a, $l[$i]) | |
1017 | + | let merged = { | |
1018 | + | let $l = productionMatrix | |
1019 | + | let $s = size($l) | |
1020 | + | let $acc0 = $Tuple4(0, 0, nil, nil) | |
1021 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1022 | + | then $a | |
1023 | + | else moveProd($a, $l[$i]) | |
1018 | 1024 | ||
1019 | - | ||
1020 | - | ||
1021 | - | ||
1025 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1026 | + | then $a | |
1027 | + | else throw("List size exceeds 50") | |
1022 | 1028 | ||
1023 | - | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_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 | |
1024 | - | let newBpStr = makeString_2C([currentPack[bpIdxLevel], currentPack[bpIdxRes], currentPack[bpIdxMat], makeString(newProdList, "_")], ":") | |
1025 | - | let bpSave = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil)) | |
1026 | - | $Tuple2([ScriptTransfer(i.caller, (unitPrice * quantity), usdtAssetId), IntegerEntry(dutyKey, (existAmount + quantity))], bpSave) | |
1027 | - | } | |
1028 | - | } | |
1029 | - | } | |
1030 | - | } | |
1029 | + | $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) | |
1030 | + | } | |
1031 | + | let newBpStr = makeString_2C([currentPack[bpIdxLevel], currentPack[bpIdxRes], currentPack[bpIdxMat], makeString(merged._3, "_")], ":") | |
1032 | + | let bpSave = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil)) | |
1033 | + | $Tuple2([StringEntry(dutyKey, makeString(merged._4, "_")), ScriptTransfer(i.caller, merged._2, usdtAssetId)], bpSave) | |
1031 | 1034 | } | |
1032 | 1035 | } | |
1033 | - | else throw("Strict value is not equal to itself.") | |
1034 | - | } | |
1035 | - | ||
1036 | - | ||
1037 | - | ||
1038 | - | @Callable(i) | |
1039 | - | func sellProductsToDutyFree (amounts) = if ((i.caller != this)) | |
1040 | - | then throw("Permission denied") | |
1041 | - | else nil | |
1036 | + | else throw("Strict value is not equal to itself.") | |
1037 | + | } | |
1042 | 1038 | ||
1043 | 1039 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let chain = take(drop(this.bytes, 1), 1) | |
5 | 5 | ||
6 | 6 | let usdtAssetId = match chain { | |
7 | 7 | case _ => | |
8 | 8 | if ((base58'2W' == $match0)) | |
9 | 9 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
10 | 10 | else if ((base58'2T' == $match0)) | |
11 | 11 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
12 | 12 | else throw("Unknown chain") | |
13 | 13 | } | |
14 | 14 | ||
15 | 15 | let defaultRestAddressStr = match chain { | |
16 | 16 | case _ => | |
17 | 17 | if ((base58'2W' == $match0)) | |
18 | 18 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
19 | 19 | else if ((base58'2T' == $match0)) | |
20 | 20 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
21 | 21 | else throw("Unknown chain") | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | let SEP = "__" | |
25 | 25 | ||
26 | 26 | let MULT6 = 1000000 | |
27 | 27 | ||
28 | 28 | let MULT7 = 10000000 | |
29 | 29 | ||
30 | 30 | let MULT8 = 100000000 | |
31 | 31 | ||
32 | 32 | let MULT10 = 10000000000 | |
33 | 33 | ||
34 | 34 | let LANDPREFIX = "LAND" | |
35 | 35 | ||
36 | 36 | let NUMRES = 6 | |
37 | 37 | ||
38 | 38 | let DEFAULTLOCATION = "Africa_F_Africa" | |
39 | 39 | ||
40 | 40 | let RESOURCEPRICEMIN = 39637 | |
41 | 41 | ||
42 | 42 | let DUTYMAXPACKAGES = 3 | |
43 | 43 | ||
44 | 44 | let DUTYBUYCOEF = 4 | |
45 | 45 | ||
46 | 46 | let resTypes = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"] | |
47 | 47 | ||
48 | 48 | let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
49 | 49 | ||
50 | 50 | 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"] | |
51 | 51 | ||
52 | 52 | let continents = ["Americas", "Europe", "Asia", "Africa", "Oceania"] | |
53 | 53 | ||
54 | 54 | let productionMatrix = ["1_1_1_2_2_5_1_10_0", "2_2_2_4_4_10_1_10_0", "3_3_3_6_6_15_1_10_0", "2_5_5_2_7_5_2_100_1", "4_10_10_4_14_10_2_100_1", "6_15_15_6_21_15_2_100_1", "1_1_1_1_1_8_1_10_2", "2_2_2_2_2_16_1_10_2", "3_3_3_3_3_24_1_10_2", "9_9_1_5_5_1_5_100_3", "18_18_2_10_10_2_5_100_3", "27_27_3_15_15_3_5_100_3", "2_2_1_2_2_2_1_10_4", "4_4_2_4_4_4_1_10_4", "6_6_3_6_6_6_1_10_4"] | |
55 | 55 | ||
56 | 56 | let recipeIdxPacksize = 7 | |
57 | 57 | ||
58 | 58 | let recipeIdxContinent = 8 | |
59 | 59 | ||
60 | 60 | let whIdxLevels = 0 | |
61 | 61 | ||
62 | 62 | let whIdxRes = 1 | |
63 | 63 | ||
64 | 64 | let whIdxMat = 2 | |
65 | 65 | ||
66 | 66 | let whIdxProd = 3 | |
67 | 67 | ||
68 | 68 | let whIdxLOFT = 4 | |
69 | 69 | ||
70 | 70 | let volLocked = 0 | |
71 | 71 | ||
72 | 72 | let volOccupied = 1 | |
73 | 73 | ||
74 | 74 | let volTotal = 3 | |
75 | 75 | ||
76 | 76 | let bpIdxLevel = 0 | |
77 | 77 | ||
78 | 78 | let bpIdxRes = 1 | |
79 | 79 | ||
80 | 80 | let bpIdxMat = 2 | |
81 | 81 | ||
82 | 82 | let bpIdxProd = 3 | |
83 | 83 | ||
84 | 84 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | let IdxCfgStakingDapp = 1 | |
88 | 88 | ||
89 | 89 | func keyRestCfg () = "%s__restConfig" | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func keyRestAddress () = "%s__restAddr" | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr)) | |
102 | 102 | ||
103 | 103 | let restCfg = readRestCfgOrFail(restContract) | |
104 | 104 | ||
105 | 105 | let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp) | |
106 | 106 | ||
107 | 107 | func keyLandAssetIdToOwner (assetId) = ("nftOwner_" + assetId) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func keyAddressRefBy (addr) = ("accRefBy_" + addr) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func keyBlocked () = "contractsBlocked" | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func keyOrderByLand (landAssetId) = ("landOrder_" + landAssetId) | |
129 | 129 | ||
130 | 130 | ||
131 | - | func | |
131 | + | func keyDutyWarehouse () = "dutyWarehouseProducts" | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | let locIdxContinent = 0 | |
135 | 135 | ||
136 | 136 | let locIdxType = 1 | |
137 | 137 | ||
138 | 138 | let locIdxId = 2 | |
139 | 139 | ||
140 | 140 | func asString (v) = match v { | |
141 | 141 | case s: String => | |
142 | 142 | s | |
143 | 143 | case _ => | |
144 | 144 | throw("fail to cast into String") | |
145 | 145 | } | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | let FACTORYMAXWAREHOUSE = 10000000000 | |
149 | 149 | ||
150 | 150 | let SELLMULTIPLIER = 200 | |
151 | 151 | ||
152 | 152 | let BUYMULTIPLIER = 300 | |
153 | 153 | ||
154 | 154 | let AUCTIONFEE = 10000 | |
155 | 155 | ||
156 | 156 | let MINSHOPPAYMENT = 100000 | |
157 | 157 | ||
158 | 158 | func keyFactoryWarehouseByIdAndType (factoryId,resType) = ((("factoryWhByContinentAndRes_" + factoryId) + "_") + toString(resType)) | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | let ordIdxRes = 0 | |
162 | 162 | ||
163 | 163 | let ordIdxMat = 1 | |
164 | 164 | ||
165 | 165 | let ordIdxProd = 2 | |
166 | 166 | ||
167 | 167 | func getOrder (ordKey) = { | |
168 | 168 | 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:"), ":") | |
169 | 169 | [if ((size(split(p[ordIdxRes], "_")) == NUMRES)) | |
170 | 170 | then p[ordIdxRes] | |
171 | 171 | else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split(p[ordIdxMat], "_")) == NUMRES)) | |
172 | 172 | then p[ordIdxMat] | |
173 | 173 | else "0@0_0@0_0@0_0@0_0@0_0@0", p[ordIdxProd]] | |
174 | 174 | } | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | func toVolume (amount,pkgSize,isProduct) = if (isProduct) | |
178 | 178 | then { | |
179 | 179 | let pkgs = if ((amount >= 0)) | |
180 | 180 | then (((amount + pkgSize) - 1) / pkgSize) | |
181 | 181 | else -((((-(amount) + pkgSize) - 1) / pkgSize)) | |
182 | 182 | (pkgs * MULT8) | |
183 | 183 | } | |
184 | 184 | else amount | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | func sellInternal (locId,resType,amount,minPrice) = { | |
188 | 188 | let whKey = keyFactoryWarehouseByIdAndType(locId, resType) | |
189 | 189 | let w0 = valueOrElse(getInteger(whKey), 0) | |
190 | 190 | let r0 = if ((w0 > FACTORYMAXWAREHOUSE)) | |
191 | 191 | then 0 | |
192 | 192 | else if (((w0 + amount) > FACTORYMAXWAREHOUSE)) | |
193 | 193 | then (FACTORYMAXWAREHOUSE - w0) | |
194 | 194 | else amount | |
195 | 195 | let usdtReceived = (fraction(r0, ((SELLMULTIPLIER * RESOURCEPRICEMIN) - fraction(((100 * w0) + (50 * r0)), RESOURCEPRICEMIN, FACTORYMAXWAREHOUSE)), MULT10) + fraction((amount - r0), RESOURCEPRICEMIN, MULT8)) | |
196 | 196 | let min99 = (minPrice - (minPrice / 100)) | |
197 | 197 | if (((min99 * amount) > (usdtReceived * MULT8))) | |
198 | 198 | then throw((((((((((("Actual price = " + toString(usdtReceived)) + " / ") + toString(amount)) + " < minPrice = ") + toString(minPrice)) + ", (") + locId) + ", ") + resTypes[resType]) + ")")) | |
199 | 199 | else $Tuple2(IntegerEntry(whKey, (w0 + amount)), usdtReceived) | |
200 | 200 | } | |
201 | 201 | ||
202 | 202 | ||
203 | 203 | func buyInternal (locId,matType,amount,maxPrice) = { | |
204 | 204 | let whKey = keyFactoryWarehouseByIdAndType(locId, matType) | |
205 | 205 | let w0 = valueOrElse(getInteger(whKey), 0) | |
206 | 206 | let m1 = if ((w0 > FACTORYMAXWAREHOUSE)) | |
207 | 207 | then min([amount, (w0 - FACTORYMAXWAREHOUSE)]) | |
208 | 208 | else 0 | |
209 | 209 | let m0 = min([w0, (amount - m1)]) | |
210 | 210 | let m = (m0 + m1) | |
211 | 211 | let usdtSpent = (fraction(m0, ((BUYMULTIPLIER * RESOURCEPRICEMIN) - fraction(((100 * w0) - (50 * m0)), RESOURCEPRICEMIN, FACTORYMAXWAREHOUSE)), MULT10) + fraction(m1, (2 * RESOURCEPRICEMIN), MULT8)) | |
212 | 212 | let max101 = (maxPrice + (maxPrice / 100)) | |
213 | 213 | if (((usdtSpent * MULT8) > (max101 * m))) | |
214 | 214 | then throw((((((((((("Actual price = " + toString(usdtSpent)) + " / ") + toString(m)) + " > maxPrice = ") + toString(maxPrice)) + ", (") + locId) + ", ") + matTypes[matType]) + ")")) | |
215 | 215 | else $Tuple3(IntegerEntry(whKey, (w0 - m)), usdtSpent, m) | |
216 | 216 | } | |
217 | 217 | ||
218 | 218 | ||
219 | 219 | func getBackpack (bpKey) = { | |
220 | 220 | let p = split(valueOrElse(getString(stakingContract, bpKey), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":") | |
221 | 221 | [toString(valueOrElse(parseInt(p[bpIdxLevel]), 0)), if ((size(split(p[bpIdxRes], "_")) == NUMRES)) | |
222 | 222 | then p[bpIdxRes] | |
223 | 223 | else "0_0_0_0_0_0", if ((size(split(p[bpIdxMat], "_")) == NUMRES)) | |
224 | 224 | then p[bpIdxMat] | |
225 | 225 | else "0_0_0_0_0_0", p[bpIdxProd]] | |
226 | 226 | } | |
227 | 227 | ||
228 | 228 | ||
229 | 229 | func checkBlocked () = if (valueOrElse(getBoolean(stakingContract, keyBlocked()), false)) | |
230 | 230 | then throw("Contracts are under maintenance") | |
231 | 231 | else unit | |
232 | 232 | ||
233 | 233 | ||
234 | 234 | func setCommon (acc,item) = { | |
235 | 235 | let j = acc._1 | |
236 | 236 | let isProd = acc._8 | |
237 | 237 | let pkgSize = if (isProd) | |
238 | 238 | then parseIntValue(split(productionMatrix[j], "_")[recipeIdxPacksize]) | |
239 | 239 | else 0 | |
240 | 240 | let itemParts = split(item, "@") | |
241 | 241 | if ((size(itemParts) != 2)) | |
242 | 242 | then throw("Incorrect order format, should be amount@price") | |
243 | 243 | else { | |
244 | 244 | let newOrdAm = parseIntValue(itemParts[0]) | |
245 | 245 | let newOrdPr = parseIntValue(itemParts[1]) | |
246 | 246 | let newOrdUsd = fraction(newOrdAm, newOrdPr, MULT8) | |
247 | 247 | let newOrdVol = toVolume(newOrdAm, pkgSize, isProd) | |
248 | 248 | let whInit = if ((size(acc._6) > j)) | |
249 | 249 | then parseIntValue(acc._6[j]) | |
250 | 250 | else 0 | |
251 | 251 | let curOrdParts = split(if ((size(acc._7) > j)) | |
252 | 252 | then acc._7[j] | |
253 | 253 | else "0@0", "@") | |
254 | 254 | let curOrdAm = parseIntValue(curOrdParts[0]) | |
255 | 255 | let curOrdPr = parseIntValue(curOrdParts[1]) | |
256 | 256 | if (if ((0 > curOrdPr)) | |
257 | 257 | then true | |
258 | 258 | else (0 > newOrdPr)) | |
259 | 259 | then throw("Price can't be negative") | |
260 | 260 | else { | |
261 | 261 | let curOrdUsd = fraction(curOrdAm, curOrdPr, MULT8) | |
262 | 262 | let curOrdVol = toVolume(curOrdAm, pkgSize, isProd) | |
263 | 263 | if ((newOrdAm == 0)) | |
264 | 264 | then if ((curOrdAm > 0)) | |
265 | 265 | then $Tuple8((j + 1), (acc._2 :+ toString(whInit)), acc._3, acc._4, (acc._5 - curOrdUsd), acc._6, acc._7, isProd) | |
266 | 266 | else $Tuple8((j + 1), (acc._2 :+ toString((whInit - curOrdAm))), acc._3, acc._4, acc._5, acc._6, acc._7, isProd) | |
267 | 267 | else if ((newOrdAm > 0)) | |
268 | 268 | then if ((0 > curOrdAm)) | |
269 | 269 | then $Tuple8((j + 1), (acc._2 :+ toString((whInit - curOrdAm))), (acc._3 + newOrdVol), acc._4, (acc._5 + newOrdUsd), acc._6, acc._7, isProd) | |
270 | 270 | else $Tuple8((j + 1), (acc._2 :+ toString(whInit)), (acc._3 + newOrdVol), acc._4, ((acc._5 + newOrdUsd) - curOrdUsd), acc._6, acc._7, isProd) | |
271 | 271 | else if ((0 > curOrdAm)) | |
272 | 272 | then { | |
273 | 273 | let amDiff = (curOrdAm - newOrdAm) | |
274 | 274 | if ((0 > (whInit - amDiff))) | |
275 | 275 | then throw((((("Attempt to take " + toString(amDiff)) + " from warehouse, but only ") + toString(whInit)) + " available")) | |
276 | 276 | else $Tuple8((j + 1), (acc._2 :+ toString((whInit - amDiff))), acc._3, (acc._4 - newOrdVol), acc._5, acc._6, acc._7, isProd) | |
277 | 277 | } | |
278 | 278 | else if ((0 > (whInit + newOrdAm))) | |
279 | 279 | then throw((((("Attempt to take " + toString(-(newOrdAm))) + " from warehouse, but only ") + toString(whInit)) + " available")) | |
280 | 280 | else $Tuple8((j + 1), (acc._2 :+ toString((whInit + newOrdAm))), acc._3, (acc._4 - newOrdVol), (acc._5 - curOrdUsd), acc._6, acc._7, isProd) | |
281 | 281 | } | |
282 | 282 | } | |
283 | 283 | } | |
284 | 284 | ||
285 | 285 | ||
286 | 286 | func setInternal (currentWh,currentOrd,newOrd) = { | |
287 | 287 | let currWhRes = split(currentWh[whIdxRes], "_") | |
288 | 288 | let currWhMat = split(currentWh[whIdxMat], "_") | |
289 | 289 | let currWhProd = if ((currentWh[whIdxProd] == "")) | |
290 | 290 | then nil | |
291 | 291 | else split(currentWh[whIdxProd], "_") | |
292 | 292 | let currentOrdRes = split(currentOrd[ordIdxRes], "_") | |
293 | 293 | let currentOrdMat = split(currentOrd[ordIdxMat], "_") | |
294 | 294 | let currentOrdProd = if ((currentOrd[ordIdxProd] == "")) | |
295 | 295 | then nil | |
296 | 296 | else split(currentOrd[ordIdxProd], "_") | |
297 | 297 | if ((size(newOrd) != 3)) | |
298 | 298 | then throw("newOrderStr should contain exactly 2 ':' separators") | |
299 | 299 | else { | |
300 | 300 | let resParts = split(newOrd[0], "_") | |
301 | 301 | let matParts = split(newOrd[1], "_") | |
302 | 302 | let prodParts = if ((newOrd[2] == "")) | |
303 | 303 | then nil | |
304 | 304 | else split(newOrd[2], "_") | |
305 | 305 | if ((size(resParts) != NUMRES)) | |
306 | 306 | then throw("All 6 resources should be passed") | |
307 | 307 | else if ((size(matParts) != NUMRES)) | |
308 | 308 | then throw("All 6 materials should be passed") | |
309 | 309 | else { | |
310 | 310 | let r = { | |
311 | 311 | let $l = resParts | |
312 | 312 | let $s = size($l) | |
313 | 313 | let $acc0 = $Tuple8(0, nil, 0, 0, 0, currWhRes, currentOrdRes, false) | |
314 | 314 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
315 | 315 | then $a | |
316 | 316 | else setCommon($a, $l[$i]) | |
317 | 317 | ||
318 | 318 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
319 | 319 | then $a | |
320 | 320 | else throw("List size exceeds 6") | |
321 | 321 | ||
322 | 322 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
323 | 323 | } | |
324 | 324 | let m = { | |
325 | 325 | let $l = matParts | |
326 | 326 | let $s = size($l) | |
327 | 327 | let $acc0 = $Tuple8(0, nil, r._3, r._4, r._5, currWhMat, currentOrdMat, false) | |
328 | 328 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
329 | 329 | then $a | |
330 | 330 | else setCommon($a, $l[$i]) | |
331 | 331 | ||
332 | 332 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
333 | 333 | then $a | |
334 | 334 | else throw("List size exceeds 6") | |
335 | 335 | ||
336 | 336 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
337 | 337 | } | |
338 | 338 | let p = if ((size(prodParts) != 0)) | |
339 | 339 | then { | |
340 | 340 | let $l = prodParts | |
341 | 341 | let $s = size($l) | |
342 | 342 | let $acc0 = $Tuple8(0, nil, m._3, m._4, m._5, currWhProd, currentOrdProd, true) | |
343 | 343 | func $f2_1 ($a,$i) = if (($i >= $s)) | |
344 | 344 | then $a | |
345 | 345 | else setCommon($a, $l[$i]) | |
346 | 346 | ||
347 | 347 | func $f2_2 ($a,$i) = if (($i >= $s)) | |
348 | 348 | then $a | |
349 | 349 | else throw("List size exceeds 50") | |
350 | 350 | ||
351 | 351 | $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) | |
352 | 352 | } | |
353 | 353 | else $Tuple8(0, currWhProd, m._3, m._4, m._5, currWhProd, currentOrdProd, true) | |
354 | 354 | $Tuple6(r._2, m._2, p._2, p._3, p._4, p._5) | |
355 | 355 | } | |
356 | 356 | } | |
357 | 357 | } | |
358 | 358 | ||
359 | 359 | ||
360 | 360 | func acceptCommon (acc,bpOrdItem) = { | |
361 | 361 | let j = acc._7 | |
362 | 362 | let isProd = acc._12 | |
363 | 363 | let pkgSize = if (isProd) | |
364 | 364 | then parseIntValue(split(productionMatrix[j], "_")[recipeIdxPacksize]) | |
365 | 365 | else 0 | |
366 | 366 | let bpOrdParts = split(bpOrdItem, "@") | |
367 | 367 | if ((size(bpOrdParts) != 2)) | |
368 | 368 | then throw("Incorrect order format, should be amount@price") | |
369 | 369 | else { | |
370 | 370 | let bpOrdAm = parseIntValue(bpOrdParts[0]) | |
371 | 371 | let bpOrdPr = parseIntValue(bpOrdParts[1]) | |
372 | 372 | if ((0 > bpOrdPr)) | |
373 | 373 | then throw("Price can't be negative") | |
374 | 374 | else { | |
375 | 375 | let bpOrdUsd = fraction(bpOrdAm, bpOrdPr, MULT8) | |
376 | 376 | let bpInit = if ((size(acc._8) > j)) | |
377 | 377 | then parseIntValue(acc._8[j]) | |
378 | 378 | else 0 | |
379 | 379 | let whInit = if ((size(acc._9) > j)) | |
380 | 380 | then parseIntValue(acc._9[j]) | |
381 | 381 | else 0 | |
382 | 382 | let whOrdInit = if ((size(acc._10) > j)) | |
383 | 383 | then acc._10[j] | |
384 | 384 | else "0@0" | |
385 | 385 | let whOrdParts = split(whOrdInit, "@") | |
386 | 386 | let whOrdAm = parseIntValue(whOrdParts[0]) | |
387 | 387 | let whOrdPr = parseIntValue(whOrdParts[1]) | |
388 | 388 | if (if ((bpOrdAm != 0)) | |
389 | 389 | then (bpOrdPr != whOrdPr) | |
390 | 390 | else false) | |
391 | 391 | then throw(((((("Prices of " + acc._11[j]) + " don't match! WH price=") + toString(whOrdPr)) + ", your price=") + toString(bpOrdPr))) | |
392 | 392 | else { | |
393 | 393 | let whOrdUsd = fraction(whOrdAm, whOrdPr, MULT8) | |
394 | 394 | let deltaVol = toVolume(bpOrdAm, pkgSize, isProd) | |
395 | 395 | if ((bpOrdAm == 0)) | |
396 | 396 | then $Tuple12((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) | |
397 | 397 | else if ((bpOrdAm > 0)) | |
398 | 398 | then if ((0 > whOrdAm)) | |
399 | 399 | then if ((bpOrdAm > -(whOrdAm))) | |
400 | 400 | then throw(((((("Attempt to buy " + toString(bpOrdAm)) + " of ") + acc._11[j]) + ", but warehouse only sells ") + toString(-(whOrdAm)))) | |
401 | 401 | else $Tuple12((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) | |
402 | 402 | else throw((("Attempt to buy " + acc._11[j]) + " while warehouse doesn't sell it")) | |
403 | 403 | else if ((whOrdAm > 0)) | |
404 | 404 | then if ((-(bpOrdAm) > whOrdAm)) | |
405 | 405 | then throw(((((("Attempt to sell " + toString(-(bpOrdAm))) + " of ") + acc._11[j]) + ", but warehouse only buys ") + toString(whOrdAm))) | |
406 | 406 | else if ((-(bpOrdAm) > bpInit)) | |
407 | 407 | then throw(((((("Attempt to sell " + toString(-(bpOrdAm))) + ", but you only have ") + toString(bpInit)) + " of ") + acc._11[j])) | |
408 | 408 | else $Tuple12((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) | |
409 | 409 | else throw((("Attempt to sell " + acc._11[j]) + " while warehouse doesn't buy it")) | |
410 | 410 | } | |
411 | 411 | } | |
412 | 412 | } | |
413 | 413 | } | |
414 | 414 | ||
415 | 415 | ||
416 | 416 | @Callable(i) | |
417 | 417 | func recalcLockedVolumeREADONLY (landAssetId,wh) = { | |
418 | 418 | let currentOrd = getOrder(keyOrderByLand(landAssetId)) | |
419 | 419 | let z = setInternal(wh, currentOrd, currentOrd) | |
420 | 420 | $Tuple2(nil, (z._4 + z._5)) | |
421 | 421 | } | |
422 | 422 | ||
423 | 423 | ||
424 | 424 | ||
425 | 425 | @Callable(i) | |
426 | 426 | func constructorV1 (restAddr) = if ((i.caller != this)) | |
427 | 427 | then throw("Permission denied") | |
428 | 428 | else [StringEntry(keyRestAddress(), restAddr)] | |
429 | 429 | ||
430 | 430 | ||
431 | 431 | ||
432 | 432 | @Callable(i) | |
433 | 433 | func sellResources (amounts,minPrices) = { | |
434 | 434 | let blocked = checkBlocked() | |
435 | 435 | if ((blocked == blocked)) | |
436 | 436 | then { | |
437 | 437 | let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
438 | 438 | if ((size(i.payments) != 0)) | |
439 | 439 | then throw("sellResources doesn't require any payments") | |
440 | 440 | else { | |
441 | 441 | let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_") | |
442 | 442 | if ((curLocation[locIdxType] != "F")) | |
443 | 443 | then throw(("Duck location type should be Factory, but is " + curLocation[locIdxType])) | |
444 | 444 | else { | |
445 | 445 | let locId = curLocation[locIdxId] | |
446 | 446 | let currentPack = getBackpack(keyBackpackByDuck(duckAssetId)) | |
447 | 447 | let resList = split(currentPack[bpIdxRes], "_") | |
448 | 448 | func adder (acc,j) = if ((amounts[j] > parseIntValue(resList[j]))) | |
449 | 449 | then throw(((((("You have " + resList[j]) + " of ") + resTypes[j]) + ", but tried to sell ") + toString(amounts[j]))) | |
450 | 450 | else if ((0 > amounts[j])) | |
451 | 451 | then throw(((("You tried to sell negative amount of " + resTypes[j]) + ": ") + toString(amounts[j]))) | |
452 | 452 | else if ((amounts[j] > 0)) | |
453 | 453 | then { | |
454 | 454 | let b = sellInternal(locId, j, amounts[j], minPrices[j]) | |
455 | 455 | $Tuple3((acc._1 :+ b._1), (acc._2 :+ toString((parseIntValue(resList[j]) - amounts[j]))), (acc._3 + b._2)) | |
456 | 456 | } | |
457 | 457 | else $Tuple3(acc._1, (acc._2 :+ resList[j]), acc._3) | |
458 | 458 | ||
459 | 459 | let merged = { | |
460 | 460 | let $l = [0, 1, 2, 3, 4, 5] | |
461 | 461 | let $s = size($l) | |
462 | 462 | let $acc0 = $Tuple3(nil, nil, 0) | |
463 | 463 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
464 | 464 | then $a | |
465 | 465 | else adder($a, $l[$i]) | |
466 | 466 | ||
467 | 467 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
468 | 468 | then $a | |
469 | 469 | else throw("List size exceeds 6") | |
470 | 470 | ||
471 | 471 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
472 | 472 | } | |
473 | 473 | let newPack = makeString([currentPack[bpIdxLevel], makeString(merged._2, "_"), currentPack[bpIdxMat], currentPack[bpIdxProd]], ":") | |
474 | 474 | let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil)) | |
475 | 475 | $Tuple2((merged._1 :+ ScriptTransfer(i.caller, merged._3, usdtAssetId)), result) | |
476 | 476 | } | |
477 | 477 | } | |
478 | 478 | } | |
479 | 479 | else throw("Strict value is not equal to itself.") | |
480 | 480 | } | |
481 | 481 | ||
482 | 482 | ||
483 | 483 | ||
484 | 484 | @Callable(i) | |
485 | 485 | func buyMaterials (amounts,maxPrices) = { | |
486 | 486 | let blocked = checkBlocked() | |
487 | 487 | if ((blocked == blocked)) | |
488 | 488 | then { | |
489 | 489 | let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
490 | 490 | if ((size(i.payments) != 1)) | |
491 | 491 | then throw("exactly 1 payment must be attached") | |
492 | 492 | else { | |
493 | 493 | let pmt = i.payments[0] | |
494 | 494 | let amt = pmt.amount | |
495 | 495 | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment") | |
496 | 496 | if ((pmtAssetId != usdtAssetId)) | |
497 | 497 | then throw("USDT payments only!") | |
498 | 498 | else { | |
499 | 499 | let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_") | |
500 | 500 | if ((curLocation[locIdxType] != "F")) | |
501 | 501 | then throw(("Duck location type should be Factory, but is " + curLocation[locIdxType])) | |
502 | 502 | else { | |
503 | 503 | let locId = curLocation[locIdxId] | |
504 | 504 | let currentPack = getBackpack(keyBackpackByDuck(duckAssetId)) | |
505 | 505 | let matList = split(currentPack[bpIdxMat], "_") | |
506 | 506 | func mUpdater (acc,j) = if ((0 > amounts[j])) | |
507 | 507 | then throw(((("You tried to buy negative amount of " + matTypes[j]) + ": ") + toString(amounts[j]))) | |
508 | 508 | else if ((amounts[j] > 0)) | |
509 | 509 | then { | |
510 | 510 | let b = buyInternal(locId, j, amounts[j], maxPrices[j]) | |
511 | 511 | $Tuple3((acc._1 :+ b._1), (acc._2 :+ toString((parseIntValue(matList[j]) + b._3))), (acc._3 + b._2)) | |
512 | 512 | } | |
513 | 513 | else $Tuple3(acc._1, (acc._2 :+ matList[j]), acc._3) | |
514 | 514 | ||
515 | 515 | let merged = { | |
516 | 516 | let $l = [0, 1, 2, 3, 4, 5] | |
517 | 517 | let $s = size($l) | |
518 | 518 | let $acc0 = $Tuple3(nil, nil, 0) | |
519 | 519 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
520 | 520 | then $a | |
521 | 521 | else mUpdater($a, $l[$i]) | |
522 | 522 | ||
523 | 523 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
524 | 524 | then $a | |
525 | 525 | else throw("List size exceeds 6") | |
526 | 526 | ||
527 | 527 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
528 | 528 | } | |
529 | 529 | if ((merged._3 > amt)) | |
530 | 530 | then throw(((("Insufficient payment! Attached=" + toString(amt)) + ", required=") + toString(merged._3))) | |
531 | 531 | else { | |
532 | 532 | let newPack = makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], makeString(merged._2, "_"), currentPack[bpIdxProd]], ":") | |
533 | 533 | let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil)) | |
534 | 534 | let rest = if (((amt - merged._3) > 0)) | |
535 | 535 | then [ScriptTransfer(i.caller, (amt - merged._3), usdtAssetId)] | |
536 | 536 | else nil | |
537 | 537 | let activitiesAmount = (merged._3 / 100) | |
538 | 538 | $Tuple2(((merged._1 ++ rest) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)), result) | |
539 | 539 | } | |
540 | 540 | } | |
541 | 541 | } | |
542 | 542 | } | |
543 | 543 | } | |
544 | 544 | else throw("Strict value is not equal to itself.") | |
545 | 545 | } | |
546 | 546 | ||
547 | 547 | ||
548 | 548 | ||
549 | 549 | @Callable(i) | |
550 | 550 | func exchangeResources (amounts) = { | |
551 | 551 | let blocked = checkBlocked() | |
552 | 552 | if ((blocked == blocked)) | |
553 | 553 | then { | |
554 | 554 | let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
555 | 555 | if ((size(i.payments) != 1)) | |
556 | 556 | then throw("exactly 1 payment must be attached") | |
557 | 557 | else { | |
558 | 558 | let pmt = i.payments[0] | |
559 | 559 | let amt = pmt.amount | |
560 | 560 | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment") | |
561 | 561 | if ((pmtAssetId != usdtAssetId)) | |
562 | 562 | then throw("USDT payments only!") | |
563 | 563 | else { | |
564 | 564 | let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_") | |
565 | 565 | if ((curLocation[locIdxType] != "F")) | |
566 | 566 | then throw(("Duck location type should be Factory, but is " + curLocation[locIdxType])) | |
567 | 567 | else { | |
568 | 568 | let locId = curLocation[locIdxId] | |
569 | 569 | let currentPack = getBackpack(keyBackpackByDuck(duckAssetId)) | |
570 | 570 | let resList = split(currentPack[bpIdxRes], "_") | |
571 | 571 | let matList = split(currentPack[bpIdxMat], "_") | |
572 | 572 | func exchanger (acc,j) = { | |
573 | 573 | let whKey = keyFactoryWarehouseByIdAndType(locId, j) | |
574 | 574 | let w0 = valueOrElse(getInteger(whKey), 0) | |
575 | 575 | let amj = amounts[j] | |
576 | 576 | if ((amj > parseIntValue(resList[j]))) | |
577 | 577 | then throw(((((("You have " + resList[j]) + " of ") + resTypes[j]) + ", but tried to exchange ") + toString(amj))) | |
578 | 578 | else if ((0 > amj)) | |
579 | 579 | then throw(((("You tried to exchange negative amount of " + resTypes[j]) + ": ") + toString(amj))) | |
580 | 580 | else if ((amj > 0)) | |
581 | 581 | then $Tuple4((acc._1 :+ toString((parseIntValue(resList[j]) - amj))), (acc._2 :+ toString((parseIntValue(matList[j]) + amj))), (acc._3 + fraction(amj, RESOURCEPRICEMIN, MULT8)), (acc._4 :+ IntegerEntry(whKey, w0))) | |
582 | 582 | else $Tuple4((acc._1 :+ resList[j]), (acc._2 :+ matList[j]), acc._3, acc._4) | |
583 | 583 | } | |
584 | 584 | ||
585 | 585 | let merged = { | |
586 | 586 | let $l = [0, 1, 2, 3, 4, 5] | |
587 | 587 | let $s = size($l) | |
588 | 588 | let $acc0 = $Tuple4(nil, nil, 0, nil) | |
589 | 589 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
590 | 590 | then $a | |
591 | 591 | else exchanger($a, $l[$i]) | |
592 | 592 | ||
593 | 593 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
594 | 594 | then $a | |
595 | 595 | else throw("List size exceeds 6") | |
596 | 596 | ||
597 | 597 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
598 | 598 | } | |
599 | 599 | if ((merged._3 > amt)) | |
600 | 600 | then throw(((("Insufficient payment! Attached=" + toString(amt)) + ", required=") + toString(merged._3))) | |
601 | 601 | else { | |
602 | 602 | let newPack = makeString([currentPack[bpIdxLevel], makeString(merged._1, "_"), makeString(merged._2, "_"), currentPack[bpIdxProd]], ":") | |
603 | 603 | let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil)) | |
604 | 604 | let rest = if (((amt - merged._3) > 0)) | |
605 | 605 | then [ScriptTransfer(i.caller, (amt - merged._3), usdtAssetId)] | |
606 | 606 | else nil | |
607 | 607 | let activitiesAmount = (merged._3 / 100) | |
608 | 608 | $Tuple2(((rest ++ merged._4) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)), result) | |
609 | 609 | } | |
610 | 610 | } | |
611 | 611 | } | |
612 | 612 | } | |
613 | 613 | } | |
614 | 614 | else throw("Strict value is not equal to itself.") | |
615 | 615 | } | |
616 | 616 | ||
617 | 617 | ||
618 | 618 | ||
619 | 619 | @Callable(i) | |
620 | 620 | func craftGoods (productIdx,quantity) = { | |
621 | 621 | let blocked = checkBlocked() | |
622 | 622 | if ((blocked == blocked)) | |
623 | 623 | then if ((size(i.payments) != 1)) | |
624 | 624 | then throw("exactly 1 payment must be attached") | |
625 | 625 | else { | |
626 | 626 | let pmt = i.payments[0] | |
627 | 627 | let amt = pmt.amount | |
628 | 628 | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment") | |
629 | 629 | if ((pmtAssetId != usdtAssetId)) | |
630 | 630 | then throw("USDT payments only!") | |
631 | 631 | else if ((amt != MULT6)) | |
632 | 632 | then throw("exactly 1 USDT must be attached as payment") | |
633 | 633 | else if ((0 >= quantity)) | |
634 | 634 | then throw("Quantity should be positive") | |
635 | 635 | else { | |
636 | 636 | let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
637 | 637 | let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_") | |
638 | 638 | if ((curLocation[locIdxType] != "M")) | |
639 | 639 | then throw(("Duck location type should be Manufactory, but is " + curLocation[locIdxType])) | |
640 | 640 | else { | |
641 | 641 | let cont = curLocation[locIdxContinent] | |
642 | 642 | let currentPack = getBackpack(keyBackpackByDuck(duckAssetId)) | |
643 | 643 | let matList = split(currentPack[bpIdxMat], "_") | |
644 | 644 | if (if ((0 > productIdx)) | |
645 | 645 | then true | |
646 | 646 | else (productIdx >= size(productionMatrix))) | |
647 | 647 | then throw(("Unknown product idx=" + toString(productIdx))) | |
648 | 648 | else { | |
649 | 649 | let recipe = split(productionMatrix[productIdx], "_") | |
650 | 650 | if ((size(recipe) != (NUMRES + 3))) | |
651 | 651 | then throw(("Fatal: unknown recipe: " + productionMatrix[productIdx])) | |
652 | 652 | else { | |
653 | 653 | let productContIdx = parseIntValue(recipe[recipeIdxContinent]) | |
654 | 654 | if ((continents[productContIdx] != cont)) | |
655 | 655 | then throw(((("This product is available in " + continents[productContIdx]) + ", but you are in ") + cont)) | |
656 | 656 | else { | |
657 | 657 | let prodList = if ((currentPack[bpIdxProd] == "")) | |
658 | 658 | then nil | |
659 | 659 | else split(currentPack[bpIdxProd], "_") | |
660 | 660 | func filler (acc,ignoredItem) = { | |
661 | 661 | let n = acc._2 | |
662 | 662 | let xs = if ((size(prodList) > n)) | |
663 | 663 | then prodList[n] | |
664 | 664 | else "0" | |
665 | 665 | let x = parseIntValue(xs) | |
666 | 666 | let amount = (quantity * parseIntValue(recipe[recipeIdxPacksize])) | |
667 | 667 | let y = if ((n == productIdx)) | |
668 | 668 | then toString((x + amount)) | |
669 | 669 | else xs | |
670 | 670 | $Tuple2((acc._1 :+ y), (n + 1)) | |
671 | 671 | } | |
672 | 672 | ||
673 | 673 | let bpProd = ( let $l = productionMatrix | |
674 | 674 | let $s = size($l) | |
675 | 675 | let $acc0 = $Tuple2(nil, 0) | |
676 | 676 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
677 | 677 | then $a | |
678 | 678 | else filler($a, $l[$i]) | |
679 | 679 | ||
680 | 680 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
681 | 681 | then $a | |
682 | 682 | else throw("List size exceeds 50") | |
683 | 683 | ||
684 | 684 | $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 | |
685 | 685 | func producer (acc,j) = { | |
686 | 686 | let needMat = ((parseIntValue(recipe[j]) * MULT7) * quantity) | |
687 | 687 | let haveMat = parseIntValue(matList[j]) | |
688 | 688 | if ((needMat > haveMat)) | |
689 | 689 | then throw(((((((("You have " + matList[j]) + " of ") + matTypes[j]) + ", but recipe requires ") + toString(needMat)) + " for quantity ") + toString(quantity))) | |
690 | 690 | else if ((needMat > 0)) | |
691 | 691 | then (acc :+ toString((haveMat - needMat))) | |
692 | 692 | else (acc :+ matList[j]) | |
693 | 693 | } | |
694 | 694 | ||
695 | 695 | let merged = { | |
696 | 696 | let $l = [0, 1, 2, 3, 4, 5] | |
697 | 697 | let $s = size($l) | |
698 | 698 | let $acc0 = nil | |
699 | 699 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
700 | 700 | then $a | |
701 | 701 | else producer($a, $l[$i]) | |
702 | 702 | ||
703 | 703 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
704 | 704 | then $a | |
705 | 705 | else throw("List size exceeds 6") | |
706 | 706 | ||
707 | 707 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
708 | 708 | } | |
709 | 709 | let newPack = makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], makeString(merged, "_"), makeString(bpProd, "_")], ":") | |
710 | 710 | let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil)) | |
711 | 711 | $Tuple2(nil, result) | |
712 | 712 | } | |
713 | 713 | } | |
714 | 714 | } | |
715 | 715 | } | |
716 | 716 | } | |
717 | 717 | } | |
718 | 718 | else throw("Strict value is not equal to itself.") | |
719 | 719 | } | |
720 | 720 | ||
721 | 721 | ||
722 | 722 | ||
723 | 723 | @Callable(i) | |
724 | 724 | func setWarehouseOrder (newOrderStr,landAssetId) = { | |
725 | 725 | let user = i.originCaller | |
726 | 726 | let addr = toString(user) | |
727 | 727 | let result = if ((user != restContract)) | |
728 | 728 | then checkBlocked() | |
729 | 729 | else false | |
730 | 730 | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
731 | 731 | if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId))))) | |
732 | 732 | then throw((("NFT " + asset.name) + " is not staked")) | |
733 | 733 | else { | |
734 | 734 | let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned")) | |
735 | 735 | if (if ((user != restContract)) | |
736 | 736 | then (owner != addr) | |
737 | 737 | else false) | |
738 | 738 | then throw((LANDPREFIX + " is not yours")) | |
739 | 739 | else { | |
740 | 740 | let newOrder = split_4C(newOrderStr, ":") | |
741 | 741 | let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil)) | |
742 | 742 | let currentWh = split_4C(wh, ":") | |
743 | 743 | let loft = split(currentWh[whIdxLOFT], "_") | |
744 | 744 | let whOccupied = parseIntValue(loft[volOccupied]) | |
745 | 745 | let whTotal = parseIntValue(loft[volTotal]) | |
746 | 746 | let ordKey = keyOrderByLand(landAssetId) | |
747 | 747 | let currentOrd = getOrder(ordKey) | |
748 | 748 | let z = setInternal(currentWh, currentOrd, newOrder) | |
749 | 749 | let buyVolSaldo = z._4 | |
750 | 750 | let sellVolSaldo = z._5 | |
751 | 751 | let whLocked = (buyVolSaldo + sellVolSaldo) | |
752 | 752 | let whFree = ((whTotal - whOccupied) - whLocked) | |
753 | 753 | if ((0 > whFree)) | |
754 | 754 | then throw((((("Attempt to reserve " + toString(buyVolSaldo)) + " space for buy orders, and ") + toString(sellVolSaldo)) + " space for sell orders, leads to negative free space")) | |
755 | 755 | else { | |
756 | 756 | let whStr = makeString_2C([currentWh[whIdxLevels], makeString(z._1, "_"), makeString(z._2, "_"), makeString(z._3, "_"), toString(whLocked)], ":") | |
757 | 757 | let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil)) | |
758 | 758 | let usdSaldo = z._6 | |
759 | 759 | let actions = if ((usdSaldo > 0)) | |
760 | 760 | then if ((size(i.payments) != 1)) | |
761 | 761 | then throw("exactly 1 payment must be attached") | |
762 | 762 | else { | |
763 | 763 | let pmt = i.payments[0] | |
764 | 764 | let amt = pmt.amount | |
765 | 765 | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment") | |
766 | 766 | if ((pmtAssetId != usdtAssetId)) | |
767 | 767 | then throw("USDT payments only!") | |
768 | 768 | else if ((amt != usdSaldo)) | |
769 | 769 | then throw(("Payment needed is " + toString(usdSaldo))) | |
770 | 770 | else [StringEntry(ordKey, newOrderStr)] | |
771 | 771 | } | |
772 | 772 | else if ((usdSaldo == 0)) | |
773 | 773 | then if ((size(i.payments) != 0)) | |
774 | 774 | then throw("No payments needed") | |
775 | 775 | else [StringEntry(ordKey, newOrderStr)] | |
776 | 776 | else if ((size(i.payments) != 0)) | |
777 | 777 | then throw("No payments needed") | |
778 | 778 | else [ScriptTransfer(addressFromStringValue(owner), -(usdSaldo), usdtAssetId), StringEntry(ordKey, newOrderStr)] | |
779 | 779 | $Tuple2(actions, $Tuple2(result, whSave)) | |
780 | 780 | } | |
781 | 781 | } | |
782 | 782 | } | |
783 | 783 | } | |
784 | 784 | ||
785 | 785 | ||
786 | 786 | ||
787 | 787 | @Callable(i) | |
788 | 788 | func acceptWarehouseOrder (bpOrderStr,landAssetId,duckAssetId) = { | |
789 | 789 | let blocked = checkBlocked() | |
790 | 790 | let caller = i.originCaller | |
791 | 791 | let callerAddr = toString(caller) | |
792 | 792 | let stakedDuckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(callerAddr)), "You don't have a duck staked") | |
793 | 793 | let curLocation = valueOrElse(getString(stakingContract, keyDuckLocation(stakedDuckAssetId)), DEFAULTLOCATION) | |
794 | 794 | let loc = split(value(curLocation), "_") | |
795 | 795 | if ((loc[locIdxType] != "L")) | |
796 | 796 | then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L")) | |
797 | 797 | else if ((stakedDuckAssetId != duckAssetId)) | |
798 | 798 | then throw(((("Your staked duck is " + stakedDuckAssetId) + ", but passed ") + duckAssetId)) | |
799 | 799 | else { | |
800 | 800 | let landAsset = value(assetInfo(fromBase58String(landAssetId))) | |
801 | 801 | if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId))))) | |
802 | 802 | then throw((("NFT " + landAsset.name) + " is not staked")) | |
803 | 803 | else { | |
804 | 804 | let landOwner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + landAsset.name) + " is orphaned")) | |
805 | 805 | if ((landOwner == callerAddr)) | |
806 | 806 | then throw("You cannot trade with yourself") | |
807 | 807 | else { | |
808 | 808 | let bpOrderParts = split_4C(bpOrderStr, ":") | |
809 | 809 | if ((size(bpOrderParts) != 3)) | |
810 | 810 | then throw("bpOrderStr should contain exactly 2 ':' separators") | |
811 | 811 | else { | |
812 | 812 | let bpOrdRes = split(bpOrderParts[0], "_") | |
813 | 813 | let bpOrdMat = split(bpOrderParts[1], "_") | |
814 | 814 | let bpOrdProd = if ((bpOrderParts[2] == "")) | |
815 | 815 | then nil | |
816 | 816 | else split(bpOrderParts[2], "_") | |
817 | 817 | if ((size(bpOrdRes) != NUMRES)) | |
818 | 818 | then throw("All 6 resources should be passed") | |
819 | 819 | else if ((size(bpOrdMat) != NUMRES)) | |
820 | 820 | then throw("All 6 materials should be passed") | |
821 | 821 | else { | |
822 | 822 | let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil)) | |
823 | 823 | let currentWh = split_4C(wh, ":") | |
824 | 824 | let currWhRes = split(currentWh[whIdxRes], "_") | |
825 | 825 | let currWhMat = split(currentWh[whIdxMat], "_") | |
826 | 826 | let currWhProd = if ((currentWh[whIdxProd] == "")) | |
827 | 827 | then nil | |
828 | 828 | else split(currentWh[whIdxProd], "_") | |
829 | 829 | let currWhLockedVol = parseIntValue(split(currentWh[whIdxLOFT], "_")[volLocked]) | |
830 | 830 | let bpKey = keyBackpackByDuck(duckAssetId) | |
831 | 831 | let currentPack = getBackpack(bpKey) | |
832 | 832 | let bpResList = split(currentPack[bpIdxRes], "_") | |
833 | 833 | let bpMatList = split(currentPack[bpIdxMat], "_") | |
834 | 834 | let bpProdList = if ((currentPack[bpIdxProd] == "")) | |
835 | 835 | then nil | |
836 | 836 | else split(currentPack[bpIdxProd], "_") | |
837 | 837 | let ordKey = keyOrderByLand(landAssetId) | |
838 | 838 | let whOrd = getOrder(ordKey) | |
839 | 839 | let whOrdRes = split(whOrd[ordIdxRes], "_") | |
840 | 840 | let whOrdMat = split(whOrd[ordIdxMat], "_") | |
841 | 841 | let whOrdProd = if ((whOrd[ordIdxProd] == "")) | |
842 | 842 | then nil | |
843 | 843 | else split(whOrd[ordIdxProd], "_") | |
844 | 844 | let r = { | |
845 | 845 | let $l = bpOrdRes | |
846 | 846 | let $s = size($l) | |
847 | 847 | let $acc0 = $Tuple12(nil, nil, nil, 0, 0, 0, 0, bpResList, currWhRes, whOrdRes, resTypes, false) | |
848 | 848 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
849 | 849 | then $a | |
850 | 850 | else acceptCommon($a, $l[$i]) | |
851 | 851 | ||
852 | 852 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
853 | 853 | then $a | |
854 | 854 | else throw("List size exceeds 6") | |
855 | 855 | ||
856 | 856 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
857 | 857 | } | |
858 | 858 | let m = { | |
859 | 859 | let $l = bpOrdMat | |
860 | 860 | let $s = size($l) | |
861 | 861 | let $acc0 = $Tuple12(nil, nil, nil, r._4, r._5, r._6, 0, bpMatList, currWhMat, whOrdMat, matTypes, false) | |
862 | 862 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
863 | 863 | then $a | |
864 | 864 | else acceptCommon($a, $l[$i]) | |
865 | 865 | ||
866 | 866 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
867 | 867 | then $a | |
868 | 868 | else throw("List size exceeds 6") | |
869 | 869 | ||
870 | 870 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
871 | 871 | } | |
872 | 872 | let p = if ((size(bpOrdProd) != 0)) | |
873 | 873 | then { | |
874 | 874 | let $l = bpOrdProd | |
875 | 875 | let $s = size($l) | |
876 | 876 | let $acc0 = $Tuple12(nil, nil, nil, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true) | |
877 | 877 | func $f2_1 ($a,$i) = if (($i >= $s)) | |
878 | 878 | then $a | |
879 | 879 | else acceptCommon($a, $l[$i]) | |
880 | 880 | ||
881 | 881 | func $f2_2 ($a,$i) = if (($i >= $s)) | |
882 | 882 | then $a | |
883 | 883 | else throw("List size exceeds 50") | |
884 | 884 | ||
885 | 885 | $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) | |
886 | 886 | } | |
887 | 887 | else $Tuple12(currWhProd, whOrdProd, bpProdList, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true) | |
888 | 888 | let volSaldo = p._4 | |
889 | 889 | let newLockedVol = if ((0 > (currWhLockedVol - volSaldo))) | |
890 | 890 | then 0 | |
891 | 891 | else (currWhLockedVol - volSaldo) | |
892 | 892 | let whStr = makeString_2C([currentWh[whIdxLevels], makeString(r._1, "_"), makeString(m._1, "_"), makeString(p._1, "_"), toString(newLockedVol)], ":") | |
893 | 893 | let newWhOrdStr = makeString_2C([makeString(r._2, "_"), makeString(m._2, "_"), makeString(p._2, "_")], ":") | |
894 | 894 | let newBpStr = makeString_2C([currentPack[bpIdxLevel], makeString(r._3, "_"), makeString(m._3, "_"), makeString(p._3, "_")], ":") | |
895 | 895 | let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil)) | |
896 | 896 | let bpSave = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil)) | |
897 | 897 | let actions = [StringEntry(ordKey, newWhOrdStr)] | |
898 | 898 | let usdWh2BpSaldo = p._5 | |
899 | 899 | let actions1 = if ((usdWh2BpSaldo > 0)) | |
900 | 900 | then { | |
901 | 901 | let usdWh2BpFee = fraction(p._5, AUCTIONFEE, MULT6) | |
902 | 902 | let refByKey = keyAddressRefBy(callerAddr) | |
903 | 903 | let refBy = getString(stakingContract, refByKey) | |
904 | 904 | if (isDefined(refBy)) | |
905 | 905 | then (((actions :+ ScriptTransfer(caller, (p._5 - (3 * usdWh2BpFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId)) :+ ScriptTransfer(addressFromStringValue(value(refBy)), usdWh2BpFee, usdtAssetId)) | |
906 | 906 | else ((actions :+ ScriptTransfer(caller, (p._5 - (3 * usdWh2BpFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId)) | |
907 | 907 | } | |
908 | 908 | else actions | |
909 | 909 | let usdBp2WhSaldo = p._6 | |
910 | 910 | let actions2 = if ((usdBp2WhSaldo > 0)) | |
911 | 911 | then if ((size(i.payments) != 1)) | |
912 | 912 | then throw("exactly 1 payment must be attached") | |
913 | 913 | else { | |
914 | 914 | let pmt = i.payments[0] | |
915 | 915 | let amt = pmt.amount | |
916 | 916 | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment") | |
917 | 917 | if ((pmtAssetId != usdtAssetId)) | |
918 | 918 | then throw("USDT payments only!") | |
919 | 919 | else if ((amt != usdBp2WhSaldo)) | |
920 | 920 | then throw(("Payment needed is " + toString(usdBp2WhSaldo))) | |
921 | 921 | else if ((MINSHOPPAYMENT > amt)) | |
922 | 922 | then throw(("Payment should be at least " + toString(MINSHOPPAYMENT))) | |
923 | 923 | else { | |
924 | 924 | let usdBp2WhFee = fraction(p._6, AUCTIONFEE, MULT6) | |
925 | 925 | let refByKey = keyAddressRefBy(landOwner) | |
926 | 926 | let refBy = getString(stakingContract, refByKey) | |
927 | 927 | if (isDefined(refBy)) | |
928 | 928 | then (((actions1 :+ ScriptTransfer(addressFromStringValue(landOwner), (p._6 - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId)) :+ ScriptTransfer(addressFromStringValue(value(refBy)), usdBp2WhFee, usdtAssetId)) | |
929 | 929 | else ((actions1 :+ ScriptTransfer(addressFromStringValue(landOwner), (p._6 - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId)) | |
930 | 930 | } | |
931 | 931 | } | |
932 | 932 | else if ((size(i.payments) != 0)) | |
933 | 933 | then throw("No payments needed") | |
934 | 934 | else actions1 | |
935 | 935 | $Tuple2(actions2, $Tuple3(blocked, whSave, bpSave)) | |
936 | 936 | } | |
937 | 937 | } | |
938 | 938 | } | |
939 | 939 | } | |
940 | 940 | } | |
941 | 941 | } | |
942 | 942 | ||
943 | 943 | ||
944 | 944 | ||
945 | 945 | @Callable(i) | |
946 | - | func | |
947 | - | | |
948 | - | | |
949 | - | | |
950 | - | | |
951 | - | | |
952 | - | then throw(" | |
946 | + | func sellProductsToDutyFree (amounts) = if ((i.caller != this)) | |
947 | + | then throw("Permission denied") | |
948 | + | else { | |
949 | + | let blocked = checkBlocked() | |
950 | + | if ((blocked == blocked)) | |
951 | + | then if ((size(i.payments) != 0)) | |
952 | + | then throw("No payments needed") | |
953 | 953 | else { | |
954 | 954 | let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
955 | 955 | let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_") | |
956 | 956 | if ((curLocation[locIdxType] != "A")) | |
957 | 957 | then throw(("Duck location type should be Airport, but is " + curLocation[locIdxType])) | |
958 | 958 | else { | |
959 | 959 | let currentPack = getBackpack(keyBackpackByDuck(duckAssetId)) | |
960 | - | if ((productIdx != 0)) | |
961 | - | then throw("Unsupported product") | |
962 | - | else { | |
963 | - | let recipe = split(productionMatrix[productIdx], "_") | |
964 | - | if ((size(recipe) != (NUMRES + 3))) | |
965 | - | then throw(("Fatal: unknown recipe: " + productionMatrix[productIdx])) | |
966 | - | else { | |
967 | - | let packSize = parseIntValue(recipe[recipeIdxPacksize]) | |
968 | - | let maxAmount = (DUTYMAXPACKAGES * packSize) | |
969 | - | let dutyKey = keyDutyWarehouseByType(productIdx) | |
970 | - | let existAmount = valueOrElse(getInteger(dutyKey), 0) | |
971 | - | let canBuy = (maxAmount - existAmount) | |
972 | - | if ((quantity > canBuy)) | |
973 | - | then throw(((("Warehouse can buy only " + toString(canBuy)) + " of ") + prodTypes[productIdx])) | |
974 | - | else { | |
975 | - | func addMat (acc,j) = (acc + parseIntValue(recipe[j])) | |
960 | + | let prodList = if ((currentPack[bpIdxProd] == "")) | |
961 | + | then nil | |
962 | + | else split(currentPack[bpIdxProd], "_") | |
963 | + | let dutyKey = keyDutyWarehouse() | |
964 | + | let existStr = getString(dutyKey) | |
965 | + | let existAmounts = if (isDefined(existStr)) | |
966 | + | then split(value(existStr), "_") | |
967 | + | else nil | |
968 | + | func moveProd (acc,recipeStr) = { | |
969 | + | let j = acc._1 | |
970 | + | let quantity = if ((size(amounts) > j)) | |
971 | + | then amounts[j] | |
972 | + | else 0 | |
973 | + | if ((0 > quantity)) | |
974 | + | then throw("Quantity cannot be negative") | |
975 | + | else { | |
976 | + | let recipe = split(recipeStr, "_") | |
977 | + | if ((size(recipe) != (NUMRES + 3))) | |
978 | + | then throw(("Fatal: unknown recipe: " + recipeStr)) | |
979 | + | else { | |
980 | + | let packSize = parseIntValue(recipe[recipeIdxPacksize]) | |
981 | + | let maxAmount = (DUTYMAXPACKAGES * packSize) | |
982 | + | let existAmount = if ((size(existAmounts) > j)) | |
983 | + | then parseIntValue(existAmounts[j]) | |
984 | + | else 0 | |
985 | + | let canBuy = (maxAmount - existAmount) | |
986 | + | if ((quantity > canBuy)) | |
987 | + | then throw(((("Warehouse can buy only " + toString(canBuy)) + " of ") + prodTypes[j])) | |
988 | + | else { | |
989 | + | func addMat (acc,m) = (acc + parseIntValue(recipe[m])) | |
976 | 990 | ||
977 | - | let totalMat = { | |
978 | - | let $l = [0, 1, 2, 3, 4, 5] | |
979 | - | let $s = size($l) | |
980 | - | let $acc0 = 0 | |
981 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
982 | - | then $a | |
983 | - | else addMat($a, $l[$i]) | |
991 | + | let totalMat = { | |
992 | + | let $l = [0, 1, 2, 3, 4, 5] | |
993 | + | let $s = size($l) | |
994 | + | let $acc0 = 0 | |
995 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
996 | + | then $a | |
997 | + | else addMat($a, $l[$i]) | |
984 | 998 | ||
985 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
986 | - | then $a | |
987 | - | else throw("List size exceeds 6") | |
999 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1000 | + | then $a | |
1001 | + | else throw("List size exceeds 6") | |
988 | 1002 | ||
989 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
1003 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
1004 | + | } | |
1005 | + | let unitPrice = fraction((totalMat * DUTYBUYCOEF), RESOURCEPRICEMIN, (packSize * 10)) | |
1006 | + | let bpProdAmount = if ((size(prodList) > j)) | |
1007 | + | then parseIntValue(prodList[j]) | |
1008 | + | else 0 | |
1009 | + | if ((quantity > bpProdAmount)) | |
1010 | + | then throw(((("You have only " + toString(bpProdAmount)) + " of ") + prodTypes[j])) | |
1011 | + | else $Tuple4((j + 1), (acc._2 + (unitPrice * quantity)), (acc._3 :+ toString((bpProdAmount - quantity))), (acc._4 :+ toString((existAmount + quantity)))) | |
990 | 1012 | } | |
991 | - | let unitPrice = fraction((totalMat * DUTYBUYCOEF), RESOURCEPRICEMIN, (packSize * 10)) | |
992 | - | let prodList = if ((currentPack[bpIdxProd] == "")) | |
993 | - | then nil | |
994 | - | else split(currentPack[bpIdxProd], "_") | |
995 | - | let bpProdAmount = if ((size(prodList) > productIdx)) | |
996 | - | then parseIntValue(prodList[productIdx]) | |
997 | - | else 0 | |
998 | - | if ((quantity > bpProdAmount)) | |
999 | - | then throw(((("You have only " + toString(bpProdAmount)) + " of ") + prodTypes[productIdx])) | |
1000 | - | else { | |
1001 | - | func subtractProd (acc,ignoredItem) = { | |
1002 | - | let n = acc._2 | |
1003 | - | let x = if ((size(prodList) > n)) | |
1004 | - | then parseIntValue(prodList[n]) | |
1005 | - | else 0 | |
1006 | - | let y = toString(if ((n == productIdx)) | |
1007 | - | then (x - quantity) | |
1008 | - | else x) | |
1009 | - | $Tuple2((acc._1 :+ y), (n + 1)) | |
1010 | - | } | |
1013 | + | } | |
1014 | + | } | |
1015 | + | } | |
1011 | 1016 | ||
1012 | - | let newProdList = ( let $l = productionMatrix | |
1013 | - | let $s = size($l) | |
1014 | - | let $acc0 = $Tuple2(nil, 0) | |
1015 | - | func $f1_1 ($a,$i) = if (($i >= $s)) | |
1016 | - | then $a | |
1017 | - | else subtractProd($a, $l[$i]) | |
1017 | + | let merged = { | |
1018 | + | let $l = productionMatrix | |
1019 | + | let $s = size($l) | |
1020 | + | let $acc0 = $Tuple4(0, 0, nil, nil) | |
1021 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1022 | + | then $a | |
1023 | + | else moveProd($a, $l[$i]) | |
1018 | 1024 | ||
1019 | - | ||
1020 | - | ||
1021 | - | ||
1025 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1026 | + | then $a | |
1027 | + | else throw("List size exceeds 50") | |
1022 | 1028 | ||
1023 | - | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_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 | |
1024 | - | let newBpStr = makeString_2C([currentPack[bpIdxLevel], currentPack[bpIdxRes], currentPack[bpIdxMat], makeString(newProdList, "_")], ":") | |
1025 | - | let bpSave = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil)) | |
1026 | - | $Tuple2([ScriptTransfer(i.caller, (unitPrice * quantity), usdtAssetId), IntegerEntry(dutyKey, (existAmount + quantity))], bpSave) | |
1027 | - | } | |
1028 | - | } | |
1029 | - | } | |
1030 | - | } | |
1029 | + | $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) | |
1030 | + | } | |
1031 | + | let newBpStr = makeString_2C([currentPack[bpIdxLevel], currentPack[bpIdxRes], currentPack[bpIdxMat], makeString(merged._3, "_")], ":") | |
1032 | + | let bpSave = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil)) | |
1033 | + | $Tuple2([StringEntry(dutyKey, makeString(merged._4, "_")), ScriptTransfer(i.caller, merged._2, usdtAssetId)], bpSave) | |
1031 | 1034 | } | |
1032 | 1035 | } | |
1033 | - | else throw("Strict value is not equal to itself.") | |
1034 | - | } | |
1035 | - | ||
1036 | - | ||
1037 | - | ||
1038 | - | @Callable(i) | |
1039 | - | func sellProductsToDutyFree (amounts) = if ((i.caller != this)) | |
1040 | - | then throw("Permission denied") | |
1041 | - | else nil | |
1036 | + | else throw("Strict value is not equal to itself.") | |
1037 | + | } | |
1042 | 1038 | ||
1043 | 1039 |
github/deemru/w8io/169f3d6 168.88 ms ◑