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