tx · HNzebDxwYnW3WDuwBreDRkRXoTFHUfYcKxfn1tvz476D 3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep: -0.03400000 Waves 2023.06.08 15:05 [2613666] smart account 3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep > SELF 0.00000000 Waves
{ "type": 13, "id": "HNzebDxwYnW3WDuwBreDRkRXoTFHUfYcKxfn1tvz476D", "fee": 3400000, "feeAssetId": null, "timestamp": 1686225944242, "version": 2, "chainId": 84, "sender": "3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep", "senderPublicKey": "7v5L7QkXxfkirALdyqmox38QCsa9jtfAtgUfHTh34eWq", "proofs": [ "2wEuE8ZMCNnaaMtgV4b4BnY1CpGi8MzRZbN91XSKEEfw2XzaC8TZxF4zABGDoT7PBgr8rVrA7dL2NzvTefQM1zXY" ], "script": "base64:BgI2CAISBAoCCBgSAwoBCBIECgIRERIECgIRERIDCgEREgQKAgEBEgQKAggIEgUKAwgICBIDCgERSQAFY2hhaW4JAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEAC3VzZHRBc3NldElkBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwASCE2nqyCAM/TtG7yo7ui5O8yYLdC136B5ao1CP5qA//uQMJAAACAQFUBQckbWF0Y2gwASBVsdifcoeC7+XjW42sBatl3ppDoS8WuwXzGreHpfHFGAkAAgECDVVua25vd24gY2hhaW4AFWRlZmF1bHRSZXN0QWRkcmVzc1N0cgQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAIjM1BRQ3V2RmJ2aDRMa1BVbnJuVTF6M2puYkExcDltM1dOaHYDCQAAAgEBVAUHJG1hdGNoMAIjM011bWtHR3p0Q0tBWHBXRHF4a2Rkb2ZxWFNVYnFRa3ZTSnkJAAIBAg1Vbmtub3duIGNoYWluAANTRVACAl9fAAVNVUxUNgDAhD0ABU1VTFQ3AICt4gQABU1VTFQ4AIDC1y8ABk1VTFQxMAC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GYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECBQUkYWNjMAAAAAEAAgADAAQABQAGAAcACAAJAAoACwAMAA0ADgAPABAAEQASABMAFAAVABYAFwAYABkAGgAbABwAHQAeAB8AIAAhACIAIwAkACUAJgAnACgAKQAqACsALAAtAC4ALwAwADEAMgQIbmV3QnBTdHIJALoJAgkAzAgCCQCRAwIFC2N1cnJlbnRQYWNrBQpicElkeExldmVsCQDMCAIJAJEDAgULY3VycmVudFBhY2sFCGJwSWR4UmVzCQDMCAIJAJEDAgULY3VycmVudFBhY2sFCGJwSWR4TWF0CQDMCAIJALkJAggFBm1lcmdlZAJfMwIBXwUDbmlsAgE6BAZicFNhdmUJAQhhc1N0cmluZwEJAPwHBAUPc3Rha2luZ0NvbnRyYWN0Ag51cGRhdGVCYWNrcGFjawkAzAgCBQtkdWNrQXNzZXRJZAkAzAgCBQhuZXdCcFN0cgUDbmlsBQNuaWwJAJQKAgkAzAgCCQELU3RyaW5nRW50cnkCBQVlc0tleQkAuQkCCAUGbWVyZ2VkAl80AgFfCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcggFBm1lcmdlZAJfMgULdXNkdEFzc2V0SWQFA25pbAUGYnBTYXZlCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAPCGycY=", "height": 2613666, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DEU9fPpELAfp5H38q1oq25mYUi2qXvai1k6Dh17spPJB Next: 2rkRJXhFv2qKpj1syztULxKtRLUxY9J2K3yZTSdjorJy Diff:
Old | New | Differences | |
---|---|---|---|
39 | 39 | ||
40 | 40 | let RESOURCEPRICEMIN = 39637 | |
41 | 41 | ||
42 | - | let | |
42 | + | let ESMAXPACKAGES = 3 | |
43 | 43 | ||
44 | - | let | |
44 | + | let ESBUYCOEF = 4 | |
45 | 45 | ||
46 | 46 | let resTypes = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"] | |
47 | 47 | ||
128 | 128 | func keyOrderByLand (landAssetId) = ("landOrder_" + landAssetId) | |
129 | 129 | ||
130 | 130 | ||
131 | - | func | |
131 | + | func keyEsWarehouse () = "emergencyWarehouseProducts" | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | let locIdxContinent = 0 | |
943 | 943 | ||
944 | 944 | ||
945 | 945 | @Callable(i) | |
946 | - | func | |
946 | + | func sellProductsToES (amounts) = if ((i.caller != this)) | |
947 | 947 | then throw("Permission denied") | |
948 | 948 | else { | |
949 | 949 | let blocked = checkBlocked() | |
960 | 960 | let prodList = if ((currentPack[bpIdxProd] == "")) | |
961 | 961 | then nil | |
962 | 962 | else split(currentPack[bpIdxProd], "_") | |
963 | - | let | |
964 | - | let existStr = getString( | |
963 | + | let esKey = keyEsWarehouse() | |
964 | + | let existStr = getString(esKey) | |
965 | 965 | let existAmounts = if (isDefined(existStr)) | |
966 | 966 | then split(value(existStr), "_") | |
967 | 967 | else nil | |
978 | 978 | then throw(("Fatal: unknown recipe: " + recipeStr)) | |
979 | 979 | else { | |
980 | 980 | let packSize = parseIntValue(recipe[recipeIdxPacksize]) | |
981 | - | let maxAmount = ( | |
981 | + | let maxAmount = (ESMAXPACKAGES * packSize) | |
982 | 982 | let existAmount = if ((size(existAmounts) > j)) | |
983 | 983 | then parseIntValue(existAmounts[j]) | |
984 | 984 | else 0 | |
1002 | 1002 | ||
1003 | 1003 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
1004 | 1004 | } | |
1005 | - | let unitPrice = fraction((totalMat * | |
1005 | + | let unitPrice = fraction((totalMat * ESBUYCOEF), RESOURCEPRICEMIN, (packSize * 10)) | |
1006 | 1006 | let bpProdAmount = if ((size(prodList) > j)) | |
1007 | 1007 | then parseIntValue(prodList[j]) | |
1008 | 1008 | else 0 | |
1030 | 1030 | } | |
1031 | 1031 | let newBpStr = makeString_2C([currentPack[bpIdxLevel], currentPack[bpIdxRes], currentPack[bpIdxMat], makeString(merged._3, "_")], ":") | |
1032 | 1032 | let bpSave = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil)) | |
1033 | - | $Tuple2([StringEntry( | |
1033 | + | $Tuple2([StringEntry(esKey, makeString(merged._4, "_")), ScriptTransfer(i.caller, merged._2, usdtAssetId)], bpSave) | |
1034 | 1034 | } | |
1035 | 1035 | } | |
1036 | 1036 | else throw("Strict value is not equal to itself.") |
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 | - | let | |
42 | + | let ESMAXPACKAGES = 3 | |
43 | 43 | ||
44 | - | let | |
44 | + | let ESBUYCOEF = 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 keyEsWarehouse () = "emergencyWarehouseProducts" | |
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 | |
946 | + | func sellProductsToES (amounts) = if ((i.caller != this)) | |
947 | 947 | then throw("Permission denied") | |
948 | 948 | else { | |
949 | 949 | let blocked = checkBlocked() | |
950 | 950 | if ((blocked == blocked)) | |
951 | 951 | then if ((size(i.payments) != 0)) | |
952 | 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 | 960 | let prodList = if ((currentPack[bpIdxProd] == "")) | |
961 | 961 | then nil | |
962 | 962 | else split(currentPack[bpIdxProd], "_") | |
963 | - | let | |
964 | - | let existStr = getString( | |
963 | + | let esKey = keyEsWarehouse() | |
964 | + | let existStr = getString(esKey) | |
965 | 965 | let existAmounts = if (isDefined(existStr)) | |
966 | 966 | then split(value(existStr), "_") | |
967 | 967 | else nil | |
968 | 968 | func moveProd (acc,recipeStr) = { | |
969 | 969 | let j = acc._1 | |
970 | 970 | let quantity = if ((size(amounts) > j)) | |
971 | 971 | then amounts[j] | |
972 | 972 | else 0 | |
973 | 973 | if ((0 > quantity)) | |
974 | 974 | then throw("Quantity cannot be negative") | |
975 | 975 | else { | |
976 | 976 | let recipe = split(recipeStr, "_") | |
977 | 977 | if ((size(recipe) != (NUMRES + 3))) | |
978 | 978 | then throw(("Fatal: unknown recipe: " + recipeStr)) | |
979 | 979 | else { | |
980 | 980 | let packSize = parseIntValue(recipe[recipeIdxPacksize]) | |
981 | - | let maxAmount = ( | |
981 | + | let maxAmount = (ESMAXPACKAGES * packSize) | |
982 | 982 | let existAmount = if ((size(existAmounts) > j)) | |
983 | 983 | then parseIntValue(existAmounts[j]) | |
984 | 984 | else 0 | |
985 | 985 | let canBuy = (maxAmount - existAmount) | |
986 | 986 | if ((quantity > canBuy)) | |
987 | 987 | then throw(((("Warehouse can buy only " + toString(canBuy)) + " of ") + prodTypes[j])) | |
988 | 988 | else { | |
989 | 989 | func addMat (acc,m) = (acc + parseIntValue(recipe[m])) | |
990 | 990 | ||
991 | 991 | let totalMat = { | |
992 | 992 | let $l = [0, 1, 2, 3, 4, 5] | |
993 | 993 | let $s = size($l) | |
994 | 994 | let $acc0 = 0 | |
995 | 995 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
996 | 996 | then $a | |
997 | 997 | else addMat($a, $l[$i]) | |
998 | 998 | ||
999 | 999 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1000 | 1000 | then $a | |
1001 | 1001 | else throw("List size exceeds 6") | |
1002 | 1002 | ||
1003 | 1003 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
1004 | 1004 | } | |
1005 | - | let unitPrice = fraction((totalMat * | |
1005 | + | let unitPrice = fraction((totalMat * ESBUYCOEF), RESOURCEPRICEMIN, (packSize * 10)) | |
1006 | 1006 | let bpProdAmount = if ((size(prodList) > j)) | |
1007 | 1007 | then parseIntValue(prodList[j]) | |
1008 | 1008 | else 0 | |
1009 | 1009 | if ((quantity > bpProdAmount)) | |
1010 | 1010 | then throw(((("You have only " + toString(bpProdAmount)) + " of ") + prodTypes[j])) | |
1011 | 1011 | else $Tuple4((j + 1), (acc._2 + (unitPrice * quantity)), (acc._3 :+ toString((bpProdAmount - quantity))), (acc._4 :+ toString((existAmount + quantity)))) | |
1012 | 1012 | } | |
1013 | 1013 | } | |
1014 | 1014 | } | |
1015 | 1015 | } | |
1016 | 1016 | ||
1017 | 1017 | let merged = { | |
1018 | 1018 | let $l = productionMatrix | |
1019 | 1019 | let $s = size($l) | |
1020 | 1020 | let $acc0 = $Tuple4(0, 0, nil, nil) | |
1021 | 1021 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1022 | 1022 | then $a | |
1023 | 1023 | else moveProd($a, $l[$i]) | |
1024 | 1024 | ||
1025 | 1025 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1026 | 1026 | then $a | |
1027 | 1027 | else throw("List size exceeds 50") | |
1028 | 1028 | ||
1029 | 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 | 1030 | } | |
1031 | 1031 | let newBpStr = makeString_2C([currentPack[bpIdxLevel], currentPack[bpIdxRes], currentPack[bpIdxMat], makeString(merged._3, "_")], ":") | |
1032 | 1032 | let bpSave = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil)) | |
1033 | - | $Tuple2([StringEntry( | |
1033 | + | $Tuple2([StringEntry(esKey, makeString(merged._4, "_")), ScriptTransfer(i.caller, merged._2, usdtAssetId)], bpSave) | |
1034 | 1034 | } | |
1035 | 1035 | } | |
1036 | 1036 | else throw("Strict value is not equal to itself.") | |
1037 | 1037 | } | |
1038 | 1038 | ||
1039 | 1039 |
github/deemru/w8io/169f3d6 133.87 ms ◑