tx · 7ALzi2wC8GDNAAek1dKHzwo6FJH5MbWWw29m4W4GqJKg 3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep: -0.06300000 Waves 2023.10.18 15:03 [2804014] smart account 3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep > SELF 0.00000000 Waves
{ "type": 13, "id": "7ALzi2wC8GDNAAek1dKHzwo6FJH5MbWWw29m4W4GqJKg", "fee": 6300000, "feeAssetId": null, "timestamp": 1697630599159, "version": 2, "chainId": 84, "sender": "3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep", "senderPublicKey": "7v5L7QkXxfkirALdyqmox38QCsa9jtfAtgUfHTh34eWq", "proofs": [ "3nxZMiwPaRF3JWxdD45VufmNVd1d3yJNxPc5iDs3KA6Kk5Eig78KLCLSWTZidmFfjnzs3F2U3TYSQQPYvYccCGV5" ], "script": "base64:BgKVAQgCEgQKAggYEgMKAQgSBAoCERESBAoCCAESAwoBARIFCgMREQgSBgoEEREICBIECgIRERIFCgMREQgSBgoEEREICBIDCgEREgMKARESBAoCEQgSBAoCAQESBQoDAQEIEgYKBAEBCAgSBAoCCAgSBQoDCAgIEgQKAggIEgUKAwgICBIDCgEREgMKAQgSAwoBARIDCgEIagAHeHBUcmFkZQCQTgAHeHBDcmFmdACQTgAKeHBTZWxsVG9FcwCQTgAGeHBTaG9wAJBOAApMQU5EUFJFRklYAgRMQU5EAAZOVU1SRVMABgAPREVGQVVMVExPQ0FUSU9OAg9BZnJpY2FfRl9BZnJpY2EAEFJFU09VUkNFUFJJQ0VNSU4A1bUCAA1FU01BWFBBQ0tBR0VTAAoACUVTQlVZQ09FRgAEABVNSU5fVVNEVF9GRUVfREVMSVZFUlkA0IYDABdNSU5fVVNEVF9GRUVfREVMSVZFUlkxNQD4yQQAD0NSQUZUX1VTRFRfQ09TVADAhD0AFENSQUZUX0RFTElWRVJZX0NPRUZGAAoAFVVTRFQyQUNSRVNfTVVMVElQTElFUgAKAAhyZXNUeXBlcwkAzAgCAgN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ZWRLZXkFCW5ld0Ftb3VudAUDbmlsBQluZXdBbW91bnQBaQESc2VuZERlbGl2ZXJ5UmV3YXJkAQRhZGRyAwkBAiE9AggFAWkGY2FsbGVyBQ9zdGFraW5nQ29udHJhY3QJAAIBAhFQZXJtaXNzaW9uIGRlbmllZAQJZnVuZFRvdGFsCQELdmFsdWVPckVsc2UCCQCfCAEFD2RlbGl2ZXJ5RnVuZEtleQAABAtsb2NrZWRUb3RhbAkBC3ZhbHVlT3JFbHNlAgkAnwgBBRFkZWxpdmVyeUxvY2tlZEtleQAABAthY3Jlc0Ftb3VudAkAaAIFFU1JTl9VU0RUX0ZFRV9ERUxJVkVSWQUVVVNEVDJBQ1JFU19NVUxUSVBMSUVSBAthY3Jlc1Jlc3VsdAkA/AcEBQ1hY3Jlc0NvbnRyYWN0AglzZW5kQWNyZXMJAMwIAgUEYWRkcgkAzAgCBQthY3Jlc0Ftb3VudAUDbmlsBQNuaWwJAJQKAgkAzAgCCQEMSW50ZWdlckVudHJ5AgUPZGVsaXZlcnlGdW5kS2V5CQBlAgUJZnVuZFRvdGFsBRVNSU5fVVNEVF9GRUVfREVMSVZFUlkJAMwIAgkBDEludGVnZXJFbnRyeQIFEWRlbGl2ZXJ5TG9ja2VkS2V5CQBlAgULbG9ja2VkVG90YWwFFU1JTl9VU0RUX0ZFRV9ERUxJVkVSWQUDbmlsBQthY3Jlc1Jlc3VsdADccras", "height": 2804014, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7ULUxtdwr4y9e2TFrzHWyK3ibTrU538Y1pBkwpGNRwpy Next: 3kdaZ5sHGDHH1LJEs8F2ULn5UyAp38iW61jJoZBE9ybX Diff:
Old | New | Differences | |
---|---|---|---|
25 | 25 | ||
26 | 26 | let l = 75000 | |
27 | 27 | ||
28 | - | let m = | |
28 | + | let m = 1000000 | |
29 | 29 | ||
30 | - | let n = | |
30 | + | let n = 10 | |
31 | 31 | ||
32 | - | let o = | |
32 | + | let o = 10 | |
33 | 33 | ||
34 | - | let p = [" | |
34 | + | let p = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"] | |
35 | 35 | ||
36 | - | let q = [" | |
36 | + | let q = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
37 | 37 | ||
38 | - | let r = | |
38 | + | let r = ["First Aid Kit L1", "First Aid Kit L2", "First Aid Kit L3", "Backpack L1", "Backpack L2", "Backpack L3", "Food Ration L1", "Food Ration L2", "Food Ration L3", "Jet Pack L1", "Jet Pack L2", "Jet Pack L3", "Shield L1", "Shield L2", "Shield L3", "Mine L1", "Mine L2", "Mine L3", "Trap L1", "Trap L2", "Trap L3"] | |
39 | 39 | ||
40 | - | let s = [" | |
40 | + | let s = ["Americas", "Europe", "Asia", "Africa", "Oceania"] | |
41 | 41 | ||
42 | - | let t = | |
42 | + | let t = 10000000 | |
43 | 43 | ||
44 | - | let u = | |
44 | + | let u = ["8_8_8_17_17_42_12_0_30_0,0,0,0,0,0,0_", "8_8_8_17_17_42_24_0_60_0,0,5,2,0,0,0_", "8_8_8_17_17_42_36_0_120_0,0,10,4,0,0,0_", "8_19_19_8_27_19_26_1_20_0,0,0,0,0,0,0_001", "8_19_19_8_27_19_52_1_40_0,0,0,0,0,0,0_001", "8_19_19_8_27_19_78_1_80_0,0,0,0,0,0,0_001", "8_8_8_8_8_60_13_2_2_0,0,0,0,0,0,0_011", "8_8_8_8_8_60_26_2_4_0,0,0,0,0,0,0_011", "8_8_8_8_8_60_39_2_8_0,0,0,0,0,0,0_011", "30_30_3_17_17_3_30_3_30_0,0,0,0,0,0,0_111", "30_30_3_17_17_3_60_3_50_0,0,0,0,0,0,0_111", "30_30_3_17_17_3_90_3_70_0,0,0,0,0,0,0_111", "18_18_10_18_18_18_11_4_10_0,0,0,0,0,0,0_201", "18_18_10_18_18_18_22_4_20_0,0,0,0,0,0,0_201", "18_18_10_18_18_18_33_4_30_0,0,0,0,0,0,0_201", "4_13_22_4_35_22_23_0_50,1,0_0,0,0,0,0,0,0_", "4_13_22_4_35_22_46_0_50,1,1_0,2,5,0,0,0,0_", "4_13_22_4_35_22_69_0_50,2,1_0,5,10,0,0,0,0_", "5_25_40_5_10_15_20_1_30,1,1_0,0,0,0,0,0,0_", "5_25_40_5_10_15_40_1_30,1,2_2,1,3,0,0,0,0_", "5_25_40_5_10_15_60_1_30,1,3_5,2,8,0,0,0,0_"] | |
45 | 45 | ||
46 | - | let v = | |
46 | + | let v = 6 | |
47 | 47 | ||
48 | - | let w = | |
48 | + | let w = 7 | |
49 | 49 | ||
50 | - | let x = | |
50 | + | let x = 11 | |
51 | 51 | ||
52 | - | let y = | |
52 | + | let y = 10 | |
53 | 53 | ||
54 | - | let z = | |
54 | + | let z = 0 | |
55 | 55 | ||
56 | - | let A = | |
56 | + | let A = 1 | |
57 | 57 | ||
58 | - | let B = | |
58 | + | let B = 2 | |
59 | 59 | ||
60 | - | let C = | |
60 | + | let C = 3 | |
61 | 61 | ||
62 | - | let D = | |
62 | + | let D = 4 | |
63 | 63 | ||
64 | 64 | let E = 0 | |
65 | 65 | ||
66 | - | let F = | |
66 | + | let F = 3 | |
67 | 67 | ||
68 | - | let G = | |
68 | + | let G = 0 | |
69 | 69 | ||
70 | - | let H = | |
70 | + | let H = 1 | |
71 | 71 | ||
72 | - | let I = | |
72 | + | let I = 2 | |
73 | 73 | ||
74 | - | let J = | |
74 | + | let J = 3 | |
75 | 75 | ||
76 | - | let K = | |
76 | + | let K = 0 | |
77 | 77 | ||
78 | - | func L (M) = ("no_" + M) | |
78 | + | let L = 1 | |
79 | + | ||
80 | + | let M = 2 | |
81 | + | ||
82 | + | func N (O) = ("no_" + O) | |
79 | 83 | ||
80 | 84 | ||
81 | - | func | |
85 | + | func P (O) = ("st_" + O) | |
82 | 86 | ||
83 | 87 | ||
84 | - | func | |
88 | + | func Q (R) = ("accRefBy_" + R) | |
85 | 89 | ||
86 | 90 | ||
87 | - | func | |
91 | + | func S (T) = ("stakedDuckByOwner_" + T) | |
88 | 92 | ||
89 | 93 | ||
90 | - | func | |
94 | + | func U (V) = ("backPack_" + V) | |
91 | 95 | ||
92 | 96 | ||
93 | - | func | |
97 | + | func W (V) = ("duckLocation_" + V) | |
94 | 98 | ||
95 | 99 | ||
96 | - | func | |
100 | + | func X (Y) = ("landOrder_" + Y) | |
97 | 101 | ||
98 | 102 | ||
99 | - | func | |
103 | + | func Z () = "emergencyWarehouseProducts" | |
100 | 104 | ||
101 | 105 | ||
102 | - | let | |
106 | + | let aa = "deliveryFund" | |
103 | 107 | ||
104 | - | let | |
108 | + | let ab = "deliveryLocked" | |
105 | 109 | ||
106 | - | func | |
110 | + | func ac (ad) = (parseIntValue(ad[v]) * t) | |
107 | 111 | ||
108 | 112 | ||
109 | - | let | |
113 | + | let ae = true | |
110 | 114 | ||
111 | - | let | |
115 | + | let af = take(drop(this.bytes, 1), 1) | |
112 | 116 | ||
113 | - | let | |
114 | - | let | |
115 | - | if ((base58'2W' == | |
117 | + | let ag = { | |
118 | + | let ah = af | |
119 | + | if ((base58'2W' == ah)) | |
116 | 120 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
117 | - | else if ((base58'2T' == | |
121 | + | else if ((base58'2T' == ah)) | |
118 | 122 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
119 | 123 | else throw("Unknown chain") | |
120 | 124 | } | |
121 | 125 | ||
122 | - | let | |
123 | - | let | |
124 | - | if ((base58'2W' == | |
126 | + | let ai = { | |
127 | + | let ah = af | |
128 | + | if ((base58'2W' == ah)) | |
125 | 129 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
126 | - | else if ((base58'2T' == | |
130 | + | else if ((base58'2T' == ah)) | |
127 | 131 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
128 | 132 | else throw("Unknown chain") | |
129 | 133 | } | |
130 | 134 | ||
131 | - | let | |
135 | + | let aj = "__" | |
132 | 136 | ||
133 | - | let | |
137 | + | let ak = 100000 | |
134 | 138 | ||
135 | - | let | |
139 | + | let al = 1000000 | |
136 | 140 | ||
137 | - | let | |
141 | + | let am = 100000000 | |
138 | 142 | ||
139 | - | let | |
143 | + | let an = 10000000000 | |
140 | 144 | ||
141 | - | let | |
145 | + | let ao = 100000 | |
142 | 146 | ||
143 | - | let | |
147 | + | let ap = [0, 1, 2, 3, 4, 5] | |
144 | 148 | ||
145 | - | func | |
149 | + | func aq (ar,as) = valueOrErrorMessage(getString(ar, as), makeString(["mandatory ", toString(ar), ".", as, " is not defined"], "")) | |
146 | 150 | ||
147 | 151 | ||
148 | - | let | |
152 | + | let at = 1 | |
149 | 153 | ||
150 | - | let | |
154 | + | let au = 6 | |
151 | 155 | ||
152 | - | let | |
156 | + | let av = 8 | |
153 | 157 | ||
154 | - | func | |
158 | + | func aw () = "%s__restConfig" | |
155 | 159 | ||
156 | 160 | ||
157 | - | func | |
161 | + | func ax () = "%s__restAddr" | |
158 | 162 | ||
159 | 163 | ||
160 | - | func | |
164 | + | func ay (az) = split_4C(aq(az, aw()), aj) | |
161 | 165 | ||
162 | 166 | ||
163 | - | func | |
167 | + | func aA (aB,aC) = valueOrErrorMessage(addressFromString(aB[aC]), ("Rest cfg doesn't contain address at index " + toString(aC))) | |
164 | 168 | ||
165 | 169 | ||
166 | - | let | |
170 | + | let aD = addressFromStringValue(valueOrElse(getString(this, ax()), ai)) | |
167 | 171 | ||
168 | - | let | |
172 | + | let aB = ay(aD) | |
169 | 173 | ||
170 | - | let | |
174 | + | let aE = aA(aB, at) | |
171 | 175 | ||
172 | - | let | |
176 | + | let aF = aA(aB, au) | |
173 | 177 | ||
174 | - | let | |
178 | + | let aG = aA(aB, av) | |
175 | 179 | ||
176 | - | func | |
177 | - | let | |
178 | - | if ($isInstanceOf( | |
180 | + | func aH (aI) = { | |
181 | + | let ah = aI | |
182 | + | if ($isInstanceOf(ah, "String")) | |
179 | 183 | then { | |
180 | - | let | |
181 | - | | |
184 | + | let aJ = ah | |
185 | + | aJ | |
182 | 186 | } | |
183 | 187 | else throw("fail to cast into String") | |
184 | 188 | } | |
185 | 189 | ||
186 | 190 | ||
187 | - | func | |
188 | - | let | |
189 | - | if ($isInstanceOf( | |
191 | + | func aK (aI) = { | |
192 | + | let ah = aI | |
193 | + | if ($isInstanceOf(ah, "Int")) | |
190 | 194 | then { | |
191 | - | let | |
192 | - | | |
195 | + | let aL = ah | |
196 | + | aL | |
193 | 197 | } | |
194 | 198 | else throw("fail to cast into Int") | |
195 | 199 | } | |
196 | 200 | ||
197 | 201 | ||
198 | - | func | |
202 | + | func aM () = "contractsBlocked" | |
199 | 203 | ||
200 | 204 | ||
201 | - | func | |
202 | - | let | |
203 | - | let | |
204 | - | let | |
205 | - | (((toString(( | |
205 | + | func aN (aO,aP) = { | |
206 | + | let aQ = pow(10, 0, aP, 0, 0, DOWN) | |
207 | + | let aR = toString((aO % aQ)) | |
208 | + | let aS = drop(toString(aQ), (1 + size(aR))) | |
209 | + | (((toString((aO / aQ)) + ".") + aS) + aR) | |
206 | 210 | } | |
207 | 211 | ||
208 | 212 | ||
209 | - | let | |
213 | + | let aT = 10000000000 | |
210 | 214 | ||
211 | - | let | |
215 | + | let aU = 200 | |
212 | 216 | ||
213 | - | let | |
217 | + | let aV = 300 | |
214 | 218 | ||
215 | - | let | |
219 | + | let aW = 10000 | |
216 | 220 | ||
217 | - | let | |
221 | + | let aX = 10000 | |
218 | 222 | ||
219 | - | let | |
223 | + | let aY = 15000 | |
220 | 224 | ||
221 | - | func | |
225 | + | func aZ (ba,bb) = ((("factoryWhByContinentAndRes_" + ba) + "_") + toString(bb)) | |
222 | 226 | ||
223 | 227 | ||
224 | - | let | |
228 | + | let bc = 0 | |
225 | 229 | ||
226 | - | let | |
230 | + | let bd = 1 | |
227 | 231 | ||
228 | - | let | |
232 | + | let be = 2 | |
229 | 233 | ||
230 | - | func | |
231 | - | let | |
232 | - | [if ((size(split( | |
233 | - | then | |
234 | - | else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split( | |
235 | - | then | |
236 | - | else "0@0_0@0_0@0_0@0_0@0_0@0", | |
234 | + | func bf (bg) = { | |
235 | + | let bh = split(valueOrElse(getString(bg), "0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:"), ":") | |
236 | + | [if ((size(split(bh[bc], "_")) == f)) | |
237 | + | then bh[bc] | |
238 | + | else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split(bh[bd], "_")) == f)) | |
239 | + | then bh[bd] | |
240 | + | else "0@0_0@0_0@0_0@0_0@0_0@0", bh[be]] | |
237 | 241 | } | |
238 | 242 | ||
239 | 243 | ||
240 | - | func | |
244 | + | func bi (bj,bk,bl) = if (bl) | |
241 | 245 | then { | |
242 | - | let | |
243 | - | then ((( | |
244 | - | else -((((-( | |
245 | - | ( | |
246 | + | let bm = if ((bj >= 0)) | |
247 | + | then (((bj + bk) - 1) / bk) | |
248 | + | else -((((-(bj) + bk) - 1) / bk)) | |
249 | + | (bm * am) | |
246 | 250 | } | |
247 | - | else | |
251 | + | else bj | |
248 | 252 | ||
249 | 253 | ||
250 | - | func | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | + | func bn (bo,bb,bj,bp) = { | |
255 | + | let bq = aZ(bo, bb) | |
256 | + | let br = valueOrElse(getInteger(bq), 0) | |
257 | + | let bs = if ((br > aT)) | |
254 | 258 | then 0 | |
255 | - | else if ((( | |
256 | - | then ( | |
257 | - | else | |
258 | - | let | |
259 | - | let | |
260 | - | if ((( | |
261 | - | then throw((((((((((("Actual price = " + toString( | |
262 | - | else $Tuple2(IntegerEntry( | |
259 | + | else if (((br + bj) > aT)) | |
260 | + | then (aT - br) | |
261 | + | else bj | |
262 | + | let bt = (fraction(bs, ((aU * h) - fraction(((100 * br) + (50 * bs)), h, aT)), an) + fraction((bj - bs), h, am)) | |
263 | + | let bu = (bp - (bp / 100)) | |
264 | + | if (((bu * bj) > (bt * am))) | |
265 | + | then throw((((((((((("Actual price = " + toString(bt)) + " / ") + toString(bj)) + " < minPrice = ") + toString(bp)) + ", (") + bo) + ", ") + p[bb]) + ")")) | |
266 | + | else $Tuple2(IntegerEntry(bq, (br + bj)), bt) | |
263 | 267 | } | |
264 | 268 | ||
265 | 269 | ||
266 | - | func | |
267 | - | let | |
268 | - | let | |
269 | - | let | |
270 | - | then min([ | |
270 | + | func bv (bo,bw,bj,bx) = { | |
271 | + | let bq = aZ(bo, bw) | |
272 | + | let br = valueOrElse(getInteger(bq), 0) | |
273 | + | let by = if ((br > aT)) | |
274 | + | then min([bj, (br - aT)]) | |
271 | 275 | else 0 | |
272 | - | let | |
273 | - | let | |
274 | - | let | |
275 | - | let | |
276 | - | let | |
277 | - | if ((( | |
278 | - | then throw((((((((((("Actual price = " + toString( | |
279 | - | else $Tuple3(IntegerEntry( | |
276 | + | let bz = min([br, (bj - by)]) | |
277 | + | let bA = (bz + by) | |
278 | + | let bB = min([br, aT]) | |
279 | + | let bC = (fraction(bz, ((aV * h) - fraction(((100 * bB) - (50 * bz)), h, aT)), an) + fraction(by, (2 * h), am)) | |
280 | + | let bD = (bx + (bx / 100)) | |
281 | + | if (((bC * am) > (bD * bA))) | |
282 | + | then throw((((((((((("Actual price = " + toString(bC)) + " / ") + toString(bA)) + " > maxPrice = ") + toString(bx)) + ", (") + bo) + ", ") + q[bw]) + ")")) | |
283 | + | else $Tuple3(IntegerEntry(bq, (br - bA)), bC, bA) | |
280 | 284 | } | |
281 | 285 | ||
282 | 286 | ||
283 | - | func | |
284 | - | let | |
285 | - | [toString(valueOrElse(parseInt( | |
286 | - | then | |
287 | - | else "0_0_0_0_0_0", if ((size(split( | |
288 | - | then | |
289 | - | else "0_0_0_0_0_0", | |
287 | + | func bE (bF) = { | |
288 | + | let bh = split_4C(valueOrElse(getString(aE, bF), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":") | |
289 | + | [toString(valueOrElse(parseInt(bh[G]), 0)), if ((size(split(bh[H], "_")) == f)) | |
290 | + | then bh[H] | |
291 | + | else "0_0_0_0_0_0", if ((size(split(bh[I], "_")) == f)) | |
292 | + | then bh[I] | |
293 | + | else "0_0_0_0_0_0", bh[J]] | |
290 | 294 | } | |
291 | 295 | ||
292 | 296 | ||
293 | - | func | |
297 | + | func bG () = if (valueOrElse(getBoolean(aE, aM()), false)) | |
294 | 298 | then throw("Contracts are under maintenance") | |
295 | 299 | else unit | |
296 | 300 | ||
297 | 301 | ||
298 | - | func | |
302 | + | func bH () = aK(reentrantInvoke(aE, "saveLastTx", nil, nil)) | |
299 | 303 | ||
300 | 304 | ||
301 | - | func | |
302 | - | let | |
303 | - | let | |
304 | - | then | |
305 | + | func bI (bJ,bK) = { | |
306 | + | let bL = bJ._1 | |
307 | + | let bM = if ((size(bJ._10) > bL)) | |
308 | + | then bJ._10[bL] | |
305 | 309 | else "0@0" | |
306 | - | let | |
307 | - | let | |
308 | - | if ((size( | |
310 | + | let bN = bJ._8 | |
311 | + | let bO = split(bM, "@") | |
312 | + | if ((size(bO) != 2)) | |
309 | 313 | then throw("Incorrect order format, should be amount@price") | |
310 | 314 | else { | |
311 | - | let | |
312 | - | let | |
313 | - | let | |
314 | - | then ( | |
315 | - | else fraction( | |
316 | - | let | |
317 | - | let | |
318 | - | then parseIntValue( | |
315 | + | let bP = parseIntValue(bO[0]) | |
316 | + | let bQ = parseIntValue(bO[1]) | |
317 | + | let bR = if (bN) | |
318 | + | then (bP * bQ) | |
319 | + | else fraction(bP, bQ, am) | |
320 | + | let bS = bi(bP, y, bN) | |
321 | + | let bT = if ((size(bJ._6) > bL)) | |
322 | + | then parseIntValue(bJ._6[bL]) | |
319 | 323 | else 0 | |
320 | - | let | |
321 | - | then | |
324 | + | let bU = split(if ((size(bJ._7) > bL)) | |
325 | + | then bJ._7[bL] | |
322 | 326 | else "0@0", "@") | |
323 | - | let | |
324 | - | let | |
325 | - | if (if ((0 > | |
327 | + | let bV = parseIntValue(bU[0]) | |
328 | + | let bW = parseIntValue(bU[1]) | |
329 | + | if (if ((0 > bW)) | |
326 | 330 | then true | |
327 | - | else (0 > | |
331 | + | else (0 > bQ)) | |
328 | 332 | then throw("Price can't be negative") | |
329 | 333 | else { | |
330 | - | let | |
331 | - | then ( | |
332 | - | else fraction( | |
333 | - | if (( | |
334 | - | then if (( | |
335 | - | then $Tuple10(( | |
336 | - | else $Tuple10(( | |
337 | - | else if (( | |
338 | - | then if ((0 > | |
339 | - | then $Tuple10(( | |
340 | - | else $Tuple10(( | |
341 | - | else if ((0 > | |
334 | + | let bX = if (bN) | |
335 | + | then (bV * bW) | |
336 | + | else fraction(bV, bW, am) | |
337 | + | if ((bP == 0)) | |
338 | + | then if ((bV > 0)) | |
339 | + | then $Tuple10((bL + 1), (bJ._2 :+ toString(bT)), bJ._3, bJ._4, (bJ._5 - bX), bJ._6, bJ._7, bN, (bJ._9 + bi(bT, y, bN)), bJ._10) | |
340 | + | else $Tuple10((bL + 1), (bJ._2 :+ toString((bT - bV))), bJ._3, bJ._4, bJ._5, bJ._6, bJ._7, bN, (bJ._9 + bi((bT - bV), y, bN)), bJ._10) | |
341 | + | else if ((bP > 0)) | |
342 | + | then if ((0 > bV)) | |
343 | + | then $Tuple10((bL + 1), (bJ._2 :+ toString((bT - bV))), (bJ._3 + bS), bJ._4, (bJ._5 + bR), bJ._6, bJ._7, bN, bi((bT - bV), y, bN), bJ._10) | |
344 | + | else $Tuple10((bL + 1), (bJ._2 :+ toString(bT)), (bJ._3 + bS), bJ._4, ((bJ._5 + bR) - bX), bJ._6, bJ._7, bN, bi(bT, y, bN), bJ._10) | |
345 | + | else if ((0 > bV)) | |
342 | 346 | then { | |
343 | - | let | |
344 | - | if ((0 > ( | |
345 | - | then throw((((("Attempt to take " + toString( | |
346 | - | else $Tuple10(( | |
347 | + | let bY = (bV - bP) | |
348 | + | if ((0 > (bT - bY))) | |
349 | + | then throw((((("Attempt to take " + toString(bY)) + " from warehouse, but only ") + toString(bT)) + " available")) | |
350 | + | else $Tuple10((bL + 1), (bJ._2 :+ toString((bT - bY))), bJ._3, (bJ._4 - bS), bJ._5, bJ._6, bJ._7, bN, bi((bT - bY), y, bN), bJ._10) | |
347 | 351 | } | |
348 | - | else if ((0 > ( | |
349 | - | then throw((((("Attempt to take " + toString(-( | |
350 | - | else $Tuple10(( | |
352 | + | else if ((0 > (bT + bP))) | |
353 | + | then throw((((("Attempt to take " + toString(-(bP))) + " from warehouse, but only ") + toString(bT)) + " available")) | |
354 | + | else $Tuple10((bL + 1), (bJ._2 :+ toString((bT + bP))), bJ._3, (bJ._4 - bS), (bJ._5 - bX), bJ._6, bJ._7, bN, bi((bT + bP), y, bN), bJ._10) | |
351 | 355 | } | |
352 | 356 | } | |
353 | 357 | } | |
354 | 358 | ||
355 | 359 | ||
356 | - | func | |
357 | - | let | |
358 | - | let | |
359 | - | let | |
360 | + | func bZ (ca,cb,cc) = { | |
361 | + | let cd = split(ca[A], "_") | |
362 | + | let ce = split(ca[B], "_") | |
363 | + | let cf = if ((ca[C] == "")) | |
360 | 364 | then nil | |
361 | - | else split_4C( | |
362 | - | let | |
363 | - | let | |
364 | - | let | |
365 | + | else split_4C(ca[C], "_") | |
366 | + | let cg = split(cb[bc], "_") | |
367 | + | let ch = split(cb[bd], "_") | |
368 | + | let ci = if ((cb[be] == "")) | |
365 | 369 | then nil | |
366 | - | else split_4C( | |
367 | - | if ((size( | |
370 | + | else split_4C(cb[be], "_") | |
371 | + | if ((size(cc) != 3)) | |
368 | 372 | then throw("newOrderStr should contain exactly 2 ':' separators") | |
369 | 373 | else { | |
370 | - | let | |
371 | - | let | |
372 | - | let | |
374 | + | let cj = split(cc[0], "_") | |
375 | + | let ck = split(cc[1], "_") | |
376 | + | let cl = if ((cc[2] == "")) | |
373 | 377 | then nil | |
374 | - | else split_4C( | |
375 | - | if ((size( | |
378 | + | else split_4C(cc[2], "_") | |
379 | + | if ((size(cj) != f)) | |
376 | 380 | then throw("All 6 resources should be passed") | |
377 | - | else if ((size( | |
381 | + | else if ((size(ck) != f)) | |
378 | 382 | then throw("All 6 materials should be passed") | |
379 | 383 | else { | |
380 | - | let | |
381 | - | let | |
382 | - | let | |
383 | - | let | |
384 | - | func | |
385 | - | then | |
386 | - | else | |
384 | + | let cm = { | |
385 | + | let cn = p | |
386 | + | let co = size(cn) | |
387 | + | let cp = $Tuple10(0, nil, 0, 0, 0, cd, cg, false, 0, cj) | |
388 | + | func cq (cr,cs) = if ((cs >= co)) | |
389 | + | then cr | |
390 | + | else bI(cr, cn[cs]) | |
387 | 391 | ||
388 | - | func | |
389 | - | then | |
392 | + | func ct (cr,cs) = if ((cs >= co)) | |
393 | + | then cr | |
390 | 394 | else throw("List size exceeds 6") | |
391 | 395 | ||
392 | - | | |
396 | + | ct(cq(cq(cq(cq(cq(cq(cp, 0), 1), 2), 3), 4), 5), 6) | |
393 | 397 | } | |
394 | - | let | |
395 | - | let | |
396 | - | let | |
397 | - | let | |
398 | - | func | |
399 | - | then | |
400 | - | else | |
398 | + | let bA = { | |
399 | + | let cn = q | |
400 | + | let co = size(cn) | |
401 | + | let cp = $Tuple10(0, nil, cm._3, cm._4, cm._5, ce, ch, false, cm._9, ck) | |
402 | + | func cu (cr,cs) = if ((cs >= co)) | |
403 | + | then cr | |
404 | + | else bI(cr, cn[cs]) | |
401 | 405 | ||
402 | - | func | |
403 | - | then | |
406 | + | func cv (cr,cs) = if ((cs >= co)) | |
407 | + | then cr | |
404 | 408 | else throw("List size exceeds 6") | |
405 | 409 | ||
406 | - | | |
410 | + | cv(cu(cu(cu(cu(cu(cu(cp, 0), 1), 2), 3), 4), 5), 6) | |
407 | 411 | } | |
408 | - | let | |
409 | - | let | |
410 | - | let | |
411 | - | let | |
412 | - | func | |
413 | - | then | |
414 | - | else | |
412 | + | let bh = { | |
413 | + | let cn = r | |
414 | + | let co = size(cn) | |
415 | + | let cp = $Tuple10(0, nil, bA._3, bA._4, bA._5, cf, ci, true, bA._9, cl) | |
416 | + | func cw (cr,cs) = if ((cs >= co)) | |
417 | + | then cr | |
418 | + | else bI(cr, cn[cs]) | |
415 | 419 | ||
416 | - | func | |
417 | - | then | |
420 | + | func cx (cr,cs) = if ((cs >= co)) | |
421 | + | then cr | |
418 | 422 | else throw("List size exceeds 50") | |
419 | 423 | ||
420 | - | | |
424 | + | cx(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cp, 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) | |
421 | 425 | } | |
422 | - | $Tuple7( | |
426 | + | $Tuple7(cm._2, bA._2, bh._2, bh._3, bh._4, bh._5, bh._9) | |
423 | 427 | } | |
424 | 428 | } | |
425 | 429 | } | |
426 | 430 | ||
427 | 431 | ||
428 | - | func | |
429 | - | let | |
430 | - | let | |
431 | - | let | |
432 | - | if ((size( | |
432 | + | func cy (bJ,cz) = { | |
433 | + | let bL = bJ._7 | |
434 | + | let bN = bJ._12 | |
435 | + | let cA = split(cz, "@") | |
436 | + | if ((size(cA) != 2)) | |
433 | 437 | then throw("Incorrect order format, should be amount@price") | |
434 | 438 | else { | |
435 | - | let | |
436 | - | let | |
437 | - | if ((0 > | |
439 | + | let cB = parseIntValue(cA[0]) | |
440 | + | let cC = parseIntValue(cA[1]) | |
441 | + | if ((0 > cC)) | |
438 | 442 | then throw("Price can't be negative") | |
439 | 443 | else { | |
440 | - | let | |
441 | - | then ( | |
442 | - | else fraction( | |
443 | - | let | |
444 | - | then parseIntValue( | |
444 | + | let cD = if (bN) | |
445 | + | then (cB * cC) | |
446 | + | else fraction(cB, cC, am) | |
447 | + | let cE = if ((size(bJ._8) > bL)) | |
448 | + | then parseIntValue(bJ._8[bL]) | |
445 | 449 | else 0 | |
446 | - | let | |
447 | - | then parseIntValue( | |
450 | + | let bT = if ((size(bJ._9) > bL)) | |
451 | + | then parseIntValue(bJ._9[bL]) | |
448 | 452 | else 0 | |
449 | - | let | |
450 | - | then | |
453 | + | let cF = if ((size(bJ._10) > bL)) | |
454 | + | then bJ._10[bL] | |
451 | 455 | else "0@0" | |
452 | - | let | |
453 | - | let | |
454 | - | let | |
455 | - | if (if (( | |
456 | - | then ( | |
456 | + | let cG = split(cF, "@") | |
457 | + | let cH = parseIntValue(cG[0]) | |
458 | + | let cI = parseIntValue(cG[1]) | |
459 | + | if (if ((cB != 0)) | |
460 | + | then (cC != cI) | |
457 | 461 | else false) | |
458 | - | then throw(((((("Prices of " + | |
462 | + | then throw(((((("Prices of " + bJ._11[bL]) + " don't match! WH price=") + toString(cI)) + ", your price=") + toString(cC))) | |
459 | 463 | else { | |
460 | - | let | |
461 | - | then ( | |
462 | - | else fraction( | |
463 | - | let | |
464 | - | if (( | |
465 | - | then $Tuple13(( | |
466 | - | else if (( | |
467 | - | then if ((0 > | |
468 | - | then if (( | |
469 | - | then throw(((((("Attempt to buy " + toString( | |
470 | - | else $Tuple13(( | |
471 | - | then ( | |
472 | - | else | |
473 | - | else throw((("Attempt to buy " + | |
474 | - | else if (( | |
475 | - | then if ((-( | |
476 | - | then throw(((((("Attempt to sell " + toString(-( | |
477 | - | else if ((-( | |
478 | - | then throw(((((("Attempt to sell " + toString(-( | |
479 | - | else $Tuple13(( | |
480 | - | then ( | |
481 | - | else | |
482 | - | else throw((("Attempt to sell " + | |
464 | + | let cJ = if (bN) | |
465 | + | then (cH * cI) | |
466 | + | else fraction(cH, cI, am) | |
467 | + | let cK = bi(cB, y, bN) | |
468 | + | if ((cB == 0)) | |
469 | + | then $Tuple13((bJ._1 :+ toString(bT)), (bJ._2 :+ cF), (bJ._3 :+ toString(cE)), bJ._4, bJ._5, bJ._6, (bJ._7 + 1), bJ._8, bJ._9, bJ._10, bJ._11, bN, bJ._13) | |
470 | + | else if ((cB > 0)) | |
471 | + | then if ((0 > cH)) | |
472 | + | then if ((cB > -(cH))) | |
473 | + | then throw(((((("Attempt to buy " + toString(cB)) + " of ") + bJ._11[bL]) + ", but warehouse only sells ") + toString(-(cH)))) | |
474 | + | else $Tuple13((bJ._1 :+ toString(bT)), (bJ._2 :+ ((toString((cH + cB)) + "@") + toString(cI))), (bJ._3 :+ toString((cE + cB))), (bJ._4 + cK), bJ._5, (bJ._6 + cD), (bJ._7 + 1), bJ._8, bJ._9, bJ._10, bJ._11, bN, (bJ._13 + (if (bN) | |
475 | + | then (cB * am) | |
476 | + | else cB))) | |
477 | + | else throw((("Attempt to buy " + bJ._11[bL]) + " while warehouse doesn't sell it")) | |
478 | + | else if ((cH > 0)) | |
479 | + | then if ((-(cB) > cH)) | |
480 | + | then throw(((((("Attempt to sell " + toString(-(cB))) + " of ") + bJ._11[bL]) + ", but warehouse only buys ") + toString(cH))) | |
481 | + | else if ((-(cB) > cE)) | |
482 | + | then throw(((((("Attempt to sell " + toString(-(cB))) + ", but you only have ") + toString(cE)) + " of ") + bJ._11[bL])) | |
483 | + | else $Tuple13((bJ._1 :+ toString((bT - cB))), (bJ._2 :+ ((toString((cH + cB)) + "@") + toString(cI))), (bJ._3 :+ toString((cE + cB))), (bJ._4 - cK), (bJ._5 - cD), bJ._6, (bJ._7 + 1), bJ._8, bJ._9, bJ._10, bJ._11, bN, (bJ._13 - (if (bN) | |
484 | + | then (cB * am) | |
485 | + | else cB))) | |
486 | + | else throw((("Attempt to sell " + bJ._11[bL]) + " while warehouse doesn't buy it")) | |
483 | 487 | } | |
484 | 488 | } | |
485 | 489 | } | |
486 | 490 | } | |
487 | 491 | ||
488 | 492 | ||
489 | - | func | |
490 | - | func | |
491 | - | then throw(((((("You have " + | |
492 | - | else if ((0 > | |
493 | - | then throw(((("You tried to sell negative amount of " + | |
494 | - | else if (( | |
493 | + | func cL (cM,cN,cO,cP) = { | |
494 | + | func cQ (bJ,bL) = if ((cO[bL] > parseIntValue(cM[bL]))) | |
495 | + | then throw(((((("You have " + cM[bL]) + " of ") + p[bL]) + ", but tried to sell ") + toString(cO[bL]))) | |
496 | + | else if ((0 > cO[bL])) | |
497 | + | then throw(((("You tried to sell negative amount of " + p[bL]) + ": ") + toString(cO[bL]))) | |
498 | + | else if ((cO[bL] > 0)) | |
495 | 499 | then { | |
496 | - | let | |
497 | - | $Tuple4(( | |
500 | + | let cR = bn(cN, bL, cO[bL], cP[bL]) | |
501 | + | $Tuple4((bJ._1 :+ cR._1), (bJ._2 :+ toString((parseIntValue(cM[bL]) - cO[bL]))), (bJ._3 + cR._2), (bJ._4 + cO[bL])) | |
498 | 502 | } | |
499 | - | else $Tuple4( | |
503 | + | else $Tuple4(bJ._1, (bJ._2 :+ cM[bL]), bJ._3, bJ._4) | |
500 | 504 | ||
501 | - | let | |
502 | - | let | |
503 | - | let | |
504 | - | func | |
505 | - | then | |
506 | - | else | |
505 | + | let cn = ap | |
506 | + | let co = size(cn) | |
507 | + | let cp = $Tuple4(nil, nil, 0, 0) | |
508 | + | func cq (cr,cs) = if ((cs >= co)) | |
509 | + | then cr | |
510 | + | else cQ(cr, cn[cs]) | |
507 | 511 | ||
508 | - | func | |
509 | - | then | |
512 | + | func ct (cr,cs) = if ((cs >= co)) | |
513 | + | then cr | |
510 | 514 | else throw("List size exceeds 6") | |
511 | 515 | ||
512 | - | | |
516 | + | ct(cq(cq(cq(cq(cq(cq(cp, 0), 1), 2), 3), 4), 5), 6) | |
513 | 517 | } | |
514 | 518 | ||
515 | 519 | ||
516 | - | func | |
517 | - | func | |
518 | - | then throw(((("You tried to buy negative amount of " + | |
519 | - | else if (( | |
520 | + | func cS (cT,cN,cO,cU) = { | |
521 | + | func cV (bJ,bL) = if ((0 > cO[bL])) | |
522 | + | then throw(((("You tried to buy negative amount of " + q[bL]) + ": ") + toString(cO[bL]))) | |
523 | + | else if ((cO[bL] > 0)) | |
520 | 524 | then { | |
521 | - | let | |
522 | - | $Tuple4(( | |
525 | + | let cR = bv(cN, bL, cO[bL], cU[bL]) | |
526 | + | $Tuple4((bJ._1 :+ cR._1), (bJ._2 :+ toString((parseIntValue(cT[bL]) + cR._3))), (bJ._3 + cR._2), (bJ._4 + cO[bL])) | |
523 | 527 | } | |
524 | - | else $Tuple4( | |
528 | + | else $Tuple4(bJ._1, (bJ._2 :+ cT[bL]), bJ._3, bJ._4) | |
525 | 529 | ||
526 | - | let | |
527 | - | let | |
528 | - | let | |
529 | - | func | |
530 | - | then | |
531 | - | else | |
530 | + | let cn = ap | |
531 | + | let co = size(cn) | |
532 | + | let cp = $Tuple4(nil, nil, 0, 0) | |
533 | + | func cq (cr,cs) = if ((cs >= co)) | |
534 | + | then cr | |
535 | + | else cV(cr, cn[cs]) | |
532 | 536 | ||
533 | - | func | |
534 | - | then | |
537 | + | func ct (cr,cs) = if ((cs >= co)) | |
538 | + | then cr | |
535 | 539 | else throw("List size exceeds 6") | |
536 | 540 | ||
537 | - | | |
541 | + | ct(cq(cq(cq(cq(cq(cq(cp, 0), 1), 2), 3), 4), 5), 6) | |
538 | 542 | } | |
539 | 543 | ||
540 | 544 | ||
541 | - | func | |
542 | - | func | |
543 | - | let | |
544 | - | if (( | |
545 | - | then throw(((((("You have " + | |
546 | - | else if ((0 > | |
547 | - | then throw(((("You tried to exchange negative amount of " + | |
548 | - | else if (( | |
549 | - | then $Tuple4(( | |
550 | - | else $Tuple4(( | |
545 | + | func cW (cM,cT,cO) = { | |
546 | + | func cX (bJ,bL) = { | |
547 | + | let cY = cO[bL] | |
548 | + | if ((cY > parseIntValue(cM[bL]))) | |
549 | + | then throw(((((("You have " + cM[bL]) + " of ") + p[bL]) + ", but tried to exchange ") + toString(cY))) | |
550 | + | else if ((0 > cY)) | |
551 | + | then throw(((("You tried to exchange negative amount of " + p[bL]) + ": ") + toString(cY))) | |
552 | + | else if ((cY > 0)) | |
553 | + | then $Tuple4((bJ._1 :+ toString((parseIntValue(cM[bL]) - cY))), (bJ._2 :+ toString((parseIntValue(cT[bL]) + cY))), (bJ._3 + fraction(cY, h, am)), (bJ._4 + cY)) | |
554 | + | else $Tuple4((bJ._1 :+ cM[bL]), (bJ._2 :+ cT[bL]), bJ._3, bJ._4) | |
551 | 555 | } | |
552 | 556 | ||
553 | - | let | |
554 | - | let | |
555 | - | let | |
556 | - | func | |
557 | - | then | |
558 | - | else | |
557 | + | let cn = ap | |
558 | + | let co = size(cn) | |
559 | + | let cp = $Tuple4(nil, nil, 0, 0) | |
560 | + | func cq (cr,cs) = if ((cs >= co)) | |
561 | + | then cr | |
562 | + | else cX(cr, cn[cs]) | |
559 | 563 | ||
560 | - | func | |
561 | - | then | |
564 | + | func ct (cr,cs) = if ((cs >= co)) | |
565 | + | then cr | |
562 | 566 | else throw("List size exceeds 6") | |
563 | 567 | ||
564 | - | | |
568 | + | ct(cq(cq(cq(cq(cq(cq(cp, 0), 1), 2), 3), 4), 5), 6) | |
565 | 569 | } | |
566 | 570 | ||
567 | 571 | ||
568 | - | func | |
572 | + | func cZ (da,db,dc) = if ((da > 0)) | |
569 | 573 | then { | |
570 | - | let | |
571 | - | if (( | |
572 | - | then throw(("This trade does not cover delivery cost of " + | |
574 | + | let dd = fraction(da, aW, al) | |
575 | + | if ((dc >= (da - (3 * dd)))) | |
576 | + | then throw(("This trade does not cover delivery cost of " + aN(dc, 6))) | |
573 | 577 | else { | |
574 | - | let | |
575 | - | let | |
576 | - | let | |
577 | - | (((if (isDefined( | |
578 | - | then [ScriptTransfer(addressFromStringValue(value( | |
579 | - | else nil) :+ ScriptTransfer( | |
578 | + | let de = Q(db) | |
579 | + | let df = getString(aE, de) | |
580 | + | let dg = addressFromStringValue(db) | |
581 | + | (((if (isDefined(df)) | |
582 | + | then [ScriptTransfer(addressFromStringValue(value(df)), dd, ag)] | |
583 | + | else nil) :+ ScriptTransfer(dg, ((da - (3 * dd)) - dc), ag)) :+ ScriptTransfer(aD, dd, ag)) | |
580 | 584 | } | |
581 | 585 | } | |
582 | 586 | else nil | |
583 | 587 | ||
584 | 588 | ||
585 | - | func | |
586 | - | then if ((size( | |
589 | + | func dh (di,dj,dk,dl) = if ((di > 0)) | |
590 | + | then if ((size(dj) != 1)) | |
587 | 591 | then throw("exactly 1 payment must be attached") | |
588 | 592 | else { | |
589 | - | let | |
590 | - | let | |
591 | - | if (if (!(isDefined( | |
593 | + | let dm = dj[0] | |
594 | + | let dn = dm.amount | |
595 | + | if (if (!(isDefined(dm.assetId))) | |
592 | 596 | then true | |
593 | - | else (value( | |
597 | + | else (value(dm.assetId) != ag)) | |
594 | 598 | then throw("USDT payments only!") | |
595 | 599 | else { | |
596 | - | let | |
597 | - | if (( | |
598 | - | then throw((((((("Insufficient payment! Attached=" + | |
599 | - | else if (( | |
600 | - | then throw(("Min shop trade is " + | |
600 | + | let do = (di + dl) | |
601 | + | if ((dn != do)) | |
602 | + | then throw((((((("Insufficient payment! Attached=" + aN(dn, 6)) + ", required=") + aN(di, 6)) + "+") + aN(dl, 6)) + "(delivery fee)")) | |
603 | + | else if ((ao > di)) | |
604 | + | then throw(("Min shop trade is " + aN(ao, 6))) | |
601 | 605 | else { | |
602 | - | let | |
603 | - | let | |
604 | - | let | |
605 | - | (((if (isDefined( | |
606 | - | then [ScriptTransfer(addressFromStringValue(value( | |
607 | - | else nil) :+ ScriptTransfer(addressFromStringValue( | |
606 | + | let dp = fraction(di, aW, al) | |
607 | + | let de = Q(dk) | |
608 | + | let df = getString(aE, de) | |
609 | + | (((if (isDefined(df)) | |
610 | + | then [ScriptTransfer(addressFromStringValue(value(df)), dp, ag)] | |
611 | + | else nil) :+ ScriptTransfer(addressFromStringValue(dk), (di - (3 * dp)), ag)) :+ ScriptTransfer(aD, dp, ag)) | |
608 | 612 | } | |
609 | 613 | } | |
610 | 614 | } | |
611 | - | else if ((size( | |
615 | + | else if ((size(dj) != 0)) | |
612 | 616 | then throw("No payments needed") | |
613 | 617 | else nil | |
614 | 618 | ||
615 | 619 | ||
616 | - | func | |
617 | - | let | |
618 | - | if (!(isDefined(getInteger( | |
619 | - | then throw((("NFT " + | |
620 | + | func dq (dr,db,ds,dt,du,dv) = { | |
621 | + | let dw = value(assetInfo(fromBase58String(dr))) | |
622 | + | if (!(isDefined(getInteger(aE, P(dr))))) | |
623 | + | then throw((("NFT " + dw.name) + " is not staked")) | |
620 | 624 | else { | |
621 | - | let | |
622 | - | if (( | |
625 | + | let dk = valueOrErrorMessage(getString(aE, N(dr)), (("NFT " + dw.name) + " is orphaned")) | |
626 | + | if ((dk == db)) | |
623 | 627 | then throw("You cannot trade with yourself") | |
624 | 628 | else { | |
625 | - | let | |
626 | - | if ((size( | |
629 | + | let dx = split_4C(ds, ":") | |
630 | + | if ((size(dx) != 3)) | |
627 | 631 | then throw("bpOrderStr should contain exactly 2 ':' separators") | |
628 | 632 | else { | |
629 | - | let | |
630 | - | let | |
631 | - | let | |
633 | + | let dy = split(dx[0], "_") | |
634 | + | let dz = split(dx[1], "_") | |
635 | + | let dA = if ((dx[2] == "")) | |
632 | 636 | then nil | |
633 | - | else split_4C( | |
634 | - | if ((size( | |
637 | + | else split_4C(dx[2], "_") | |
638 | + | if ((size(dy) != f)) | |
635 | 639 | then throw("All 6 resources should be passed") | |
636 | - | else if ((size( | |
640 | + | else if ((size(dz) != f)) | |
637 | 641 | then throw("All 6 materials should be passed") | |
638 | 642 | else { | |
639 | - | let | |
640 | - | let | |
641 | - | let | |
642 | - | let | |
643 | - | let | |
643 | + | let dB = aH(invoke(aE, "getWarehouseREADONLY", [dr], nil)) | |
644 | + | let ca = split_4C(dB, ":") | |
645 | + | let cd = split(ca[A], "_") | |
646 | + | let ce = split(ca[B], "_") | |
647 | + | let cf = if ((ca[C] == "")) | |
644 | 648 | then nil | |
645 | - | else split_4C( | |
646 | - | let | |
647 | - | let | |
648 | - | let | |
649 | - | let | |
650 | - | let | |
651 | - | let | |
649 | + | else split_4C(ca[C], "_") | |
650 | + | let dC = parseIntValue(split(ca[D], "_")[E]) | |
651 | + | let bg = X(dr) | |
652 | + | let dD = bf(bg) | |
653 | + | let dE = split(dD[bc], "_") | |
654 | + | let dF = split(dD[bd], "_") | |
655 | + | let dG = if ((dD[be] == "")) | |
652 | 656 | then nil | |
653 | - | else split_4C( | |
654 | - | let | |
655 | - | let | |
656 | - | let | |
657 | - | let | |
658 | - | func | |
659 | - | then | |
660 | - | else | |
657 | + | else split_4C(dD[be], "_") | |
658 | + | let cm = { | |
659 | + | let cn = dy | |
660 | + | let co = size(cn) | |
661 | + | let cp = $Tuple13(nil, nil, nil, 0, 0, 0, 0, dt, cd, dE, p, false, 0) | |
662 | + | func cq (cr,cs) = if ((cs >= co)) | |
663 | + | then cr | |
664 | + | else cy(cr, cn[cs]) | |
661 | 665 | ||
662 | - | func | |
663 | - | then | |
666 | + | func ct (cr,cs) = if ((cs >= co)) | |
667 | + | then cr | |
664 | 668 | else throw("List size exceeds 6") | |
665 | 669 | ||
666 | - | | |
670 | + | ct(cq(cq(cq(cq(cq(cq(cp, 0), 1), 2), 3), 4), 5), 6) | |
667 | 671 | } | |
668 | - | let | |
669 | - | let | |
670 | - | let | |
671 | - | let | |
672 | - | func | |
673 | - | then | |
674 | - | else | |
672 | + | let bA = { | |
673 | + | let cn = dz | |
674 | + | let co = size(cn) | |
675 | + | let cp = $Tuple13(nil, nil, nil, cm._4, cm._5, cm._6, 0, du, ce, dF, q, false, cm._13) | |
676 | + | func cu (cr,cs) = if ((cs >= co)) | |
677 | + | then cr | |
678 | + | else cy(cr, cn[cs]) | |
675 | 679 | ||
676 | - | func | |
677 | - | then | |
680 | + | func cv (cr,cs) = if ((cs >= co)) | |
681 | + | then cr | |
678 | 682 | else throw("List size exceeds 6") | |
679 | 683 | ||
680 | - | | |
684 | + | cv(cu(cu(cu(cu(cu(cu(cp, 0), 1), 2), 3), 4), 5), 6) | |
681 | 685 | } | |
682 | - | let | |
686 | + | let bh = if ((size(dA) != 0)) | |
683 | 687 | then { | |
684 | - | let | |
685 | - | let | |
686 | - | let | |
687 | - | func | |
688 | - | then | |
689 | - | else | |
688 | + | let cn = dA | |
689 | + | let co = size(cn) | |
690 | + | let cp = $Tuple13(nil, nil, nil, bA._4, bA._5, bA._6, 0, dv, cf, dG, r, true, bA._13) | |
691 | + | func cw (cr,cs) = if ((cs >= co)) | |
692 | + | then cr | |
693 | + | else cy(cr, cn[cs]) | |
690 | 694 | ||
691 | - | func | |
692 | - | then | |
695 | + | func cx (cr,cs) = if ((cs >= co)) | |
696 | + | then cr | |
693 | 697 | else throw("List size exceeds 50") | |
694 | 698 | ||
695 | - | | |
699 | + | cx(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cp, 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) | |
696 | 700 | } | |
697 | - | else $Tuple13( | |
698 | - | let | |
699 | - | let | |
701 | + | else $Tuple13(cf, dG, dv, bA._4, bA._5, bA._6, 0, dv, cf, dG, r, true, bA._13) | |
702 | + | let dH = bh._4 | |
703 | + | let dI = if ((0 > (dC - dH))) | |
700 | 704 | then 0 | |
701 | - | else ( | |
702 | - | let | |
703 | - | let | |
704 | - | let | |
705 | - | let | |
706 | - | $Tuple10(StringEntry( | |
705 | + | else (dC - dH) | |
706 | + | let dJ = makeString_2C([ca[z], makeString(cm._1, "_"), makeString(bA._1, "_"), makeString_2C(bh._1, "_"), toString(dI)], ":") | |
707 | + | let dK = makeString_2C([makeString(cm._2, "_"), makeString(bA._2, "_"), makeString_2C(bh._2, "_")], ":") | |
708 | + | let dL = aH(invoke(aE, "saveWarehouse", [dJ, dr], nil)) | |
709 | + | let dM = aK(invoke(aE, "updateAccStats", [dk, fraction(d, bh._13, am)], nil)) | |
710 | + | $Tuple10(StringEntry(bg, dK), cm._3, bA._3, bh._3, bh._5, bh._6, bh._13, dk, dL, dM) | |
707 | 711 | } | |
708 | 712 | } | |
709 | 713 | } | |
711 | 715 | } | |
712 | 716 | ||
713 | 717 | ||
714 | - | func | |
715 | - | let | |
716 | - | let | |
717 | - | let | |
718 | - | let | |
719 | - | let | |
720 | - | func | |
721 | - | let | |
722 | - | $Tuple3(( | |
718 | + | func dN (bj) = { | |
719 | + | let dO = (bj / 30) | |
720 | + | let dP = [dO, dO, dO, dO, dO, dO] | |
721 | + | let aJ = toString(dO) | |
722 | + | let cM = [aJ, aJ, aJ, aJ, aJ, aJ] | |
723 | + | let cP = [0, 0, 0, 0, 0, 0] | |
724 | + | func dQ (bJ,dR) = { | |
725 | + | let dS = cL(cM, dR, dP, cP) | |
726 | + | $Tuple3((bJ._1 ++ dS._1), (bJ._2 + dS._3), (bJ._3 + dS._4)) | |
723 | 727 | } | |
724 | 728 | ||
725 | - | let | |
726 | - | let | |
727 | - | let | |
728 | - | let | |
729 | - | func | |
730 | - | then | |
731 | - | else | |
729 | + | let dT = { | |
730 | + | let cn = s | |
731 | + | let co = size(cn) | |
732 | + | let cp = $Tuple3(nil, 0, 0) | |
733 | + | func cq (cr,cs) = if ((cs >= co)) | |
734 | + | then cr | |
735 | + | else dQ(cr, cn[cs]) | |
732 | 736 | ||
733 | - | func | |
734 | - | then | |
737 | + | func ct (cr,cs) = if ((cs >= co)) | |
738 | + | then cr | |
735 | 739 | else throw("List size exceeds 5") | |
736 | 740 | ||
737 | - | | |
741 | + | ct(cq(cq(cq(cq(cq(cp, 0), 1), 2), 3), 4), 5) | |
738 | 742 | } | |
739 | - | let | |
740 | - | let | |
741 | - | let | |
742 | - | let | |
743 | - | let | |
744 | - | let | |
745 | - | $Tuple5( | |
743 | + | let dU = dT._1 | |
744 | + | let bt = dT._2 | |
745 | + | let dV = dT._3 | |
746 | + | let dW = fraction(bt, aX, al) | |
747 | + | let dX = (bt / 100) | |
748 | + | let dY = ((bt - dX) - dW) | |
749 | + | $Tuple5(dU, dY, dW, dX, dV) | |
746 | 750 | } | |
747 | 751 | ||
748 | 752 | ||
749 | - | @Callable(dX) | |
750 | - | func recalcLockedVolumeREADONLY (W,dz) = { | |
751 | - | let bZ = bd(V(W)) | |
752 | - | let dY = bX(dz, bZ, bZ) | |
753 | - | $Tuple2(nil, (dY._4 + dY._5)) | |
753 | + | func dZ (cT,ea,eb,ec,ed) = if ((0 >= ed)) | |
754 | + | then throw("Quantity should be positive") | |
755 | + | else if (if ((0 > ec)) | |
756 | + | then true | |
757 | + | else (ec >= size(u))) | |
758 | + | then throw(("Unknown product idx=" + toString(ec))) | |
759 | + | else { | |
760 | + | let ad = split(u[ec], "_") | |
761 | + | if ((size(ad) != x)) | |
762 | + | then throw(("Fatal: unknown recipe: " + u[ec])) | |
763 | + | else { | |
764 | + | let ee = parseIntValue(ad[w]) | |
765 | + | if ((s[ee] != eb)) | |
766 | + | then throw(((("This product is available in " + s[ee]) + ", not in ") + eb)) | |
767 | + | else { | |
768 | + | func ef (bJ,eg) = { | |
769 | + | let aL = bJ._2 | |
770 | + | let eh = if ((size(ea) > aL)) | |
771 | + | then ea[aL] | |
772 | + | else "0" | |
773 | + | let dS = parseIntValue(eh) | |
774 | + | let bj = (ed * y) | |
775 | + | let ei = if ((aL == ec)) | |
776 | + | then toString((dS + bj)) | |
777 | + | else eh | |
778 | + | $Tuple2((bJ._1 :+ ei), (aL + 1)) | |
779 | + | } | |
780 | + | ||
781 | + | let ej = ( let cn = u | |
782 | + | let co = size(cn) | |
783 | + | let cp = $Tuple2(nil, 0) | |
784 | + | func cq (cr,cs) = if ((cs >= co)) | |
785 | + | then cr | |
786 | + | else ef(cr, cn[cs]) | |
787 | + | ||
788 | + | func ct (cr,cs) = if ((cs >= co)) | |
789 | + | then cr | |
790 | + | else throw("List size exceeds 50") | |
791 | + | ||
792 | + | ct(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cp, 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 | |
793 | + | func ek (bJ,bL) = { | |
794 | + | let el = (((parseIntValue(ad[bL]) * ak) * ed) * parseIntValue(ad[v])) | |
795 | + | let em = parseIntValue(cT[bL]) | |
796 | + | if ((el > em)) | |
797 | + | then throw(((((((("You have " + aN(em, 8)) + " of ") + q[bL]) + ", but recipe requires ") + aN(el, 8)) + " for quantity ") + toString(ed))) | |
798 | + | else if ((el > 0)) | |
799 | + | then $Tuple2((bJ._1 :+ toString((em - el))), (bJ._2 + el)) | |
800 | + | else $Tuple2((bJ._1 :+ cT[bL]), bJ._2) | |
801 | + | } | |
802 | + | ||
803 | + | let en = { | |
804 | + | let cn = ap | |
805 | + | let co = size(cn) | |
806 | + | let cp = $Tuple2(nil, 0) | |
807 | + | func cu (cr,cs) = if ((cs >= co)) | |
808 | + | then cr | |
809 | + | else ek(cr, cn[cs]) | |
810 | + | ||
811 | + | func cv (cr,cs) = if ((cs >= co)) | |
812 | + | then cr | |
813 | + | else throw("List size exceeds 6") | |
814 | + | ||
815 | + | cv(cu(cu(cu(cu(cu(cu(cp, 0), 1), 2), 3), 4), 5), 6) | |
816 | + | } | |
817 | + | $Tuple3(en._1, ej, en._2) | |
818 | + | } | |
819 | + | } | |
820 | + | } | |
821 | + | ||
822 | + | ||
823 | + | @Callable(eo) | |
824 | + | func recalcLockedVolumeREADONLY (Y,dB) = { | |
825 | + | let cb = bf(X(Y)) | |
826 | + | let ep = bZ(dB, cb, cb) | |
827 | + | $Tuple2(nil, (ep._4 + ep._5)) | |
754 | 828 | } | |
755 | 829 | ||
756 | 830 | ||
757 | 831 | ||
758 | - | @Callable( | |
759 | - | func constructorV1 ( | |
832 | + | @Callable(eo) | |
833 | + | func constructorV1 (eq) = if ((eo.caller != this)) | |
760 | 834 | then throw("Permission denied") | |
761 | - | else [StringEntry( | |
835 | + | else [StringEntry(ax(), eq)] | |
762 | 836 | ||
763 | 837 | ||
764 | 838 | ||
765 | - | @Callable( | |
766 | - | func sellResources ( | |
767 | - | let | |
768 | - | if (( | |
839 | + | @Callable(eo) | |
840 | + | func sellResources (cO,cP) = { | |
841 | + | let er = bH() | |
842 | + | if ((er == er)) | |
769 | 843 | then { | |
770 | - | let | |
771 | - | if ((size( | |
844 | + | let V = valueOrErrorMessage(getString(aE, S(toString(eo.caller))), "You don't have a duck staked") | |
845 | + | if ((size(eo.payments) != 0)) | |
772 | 846 | then throw("sellResources doesn't require any payments") | |
773 | 847 | else { | |
774 | - | let | |
775 | - | if (( | |
776 | - | then throw(("Duck location type should be Factory, but is " + | |
848 | + | let es = split(valueOrElse(getString(aE, W(V)), g), "_") | |
849 | + | if ((es[L] != "F")) | |
850 | + | then throw(("Duck location type should be Factory, but is " + es[L])) | |
777 | 851 | else { | |
778 | - | let | |
779 | - | let | |
780 | - | let | |
781 | - | let | |
782 | - | let | |
783 | - | let | |
784 | - | let | |
785 | - | let | |
786 | - | let | |
787 | - | let | |
788 | - | let | |
789 | - | $Tuple2((( | |
852 | + | let et = bE(U(V)) | |
853 | + | let cM = split(et[H], "_") | |
854 | + | let eu = cL(cM, es[M], cO, cP) | |
855 | + | let dU = eu._1 | |
856 | + | let ev = eu._2 | |
857 | + | let bt = eu._3 | |
858 | + | let dV = eu._4 | |
859 | + | let dX = (bt / 100) | |
860 | + | let ew = makeString_2C([et[G], makeString(ev, "_"), et[I], et[J]], ":") | |
861 | + | let ex = aH(invoke(aE, "updateBackpack", [V, ew], nil)) | |
862 | + | let ey = aK(invoke(aE, "updateDuckStats", [V, fraction(a, dV, am)], nil)) | |
863 | + | $Tuple2(((dU :+ ScriptTransfer(eo.caller, (bt - dX), ag)) :+ ScriptTransfer(aD, dX, ag)), $Tuple3(ex, er, ey)) | |
790 | 864 | } | |
791 | 865 | } | |
792 | 866 | } | |
795 | 869 | ||
796 | 870 | ||
797 | 871 | ||
798 | - | @Callable( | |
799 | - | func sellResourcesWorld ( | |
872 | + | @Callable(eo) | |
873 | + | func sellResourcesWorld (R,bj) = if ((eo.caller != aG)) | |
800 | 874 | then throw("Permission denied") | |
801 | 875 | else { | |
802 | - | let | |
803 | - | let | |
804 | - | let | |
805 | - | let | |
806 | - | let | |
807 | - | let | |
808 | - | if ((0 >= | |
809 | - | then throw(("This trade does not cover delivery cost of " + | |
876 | + | let ez = dN(bj) | |
877 | + | let dU = ez._1 | |
878 | + | let dY = ez._2 | |
879 | + | let dW = ez._3 | |
880 | + | let dX = ez._4 | |
881 | + | let dV = ez._5 | |
882 | + | if ((0 >= dY)) | |
883 | + | then throw(("This trade does not cover delivery cost of " + aN(dW, 6))) | |
810 | 884 | else { | |
811 | - | let | |
812 | - | $Tuple2(((( | |
885 | + | let ey = aK(invoke(aE, "updateAccStats", [R, fraction(a, dV, am)], nil)) | |
886 | + | $Tuple2((((dU :+ IntegerEntry(aa, (valueOrElse(getInteger(aa), 0) + dW))) :+ ScriptTransfer(aD, dX, ag)) :+ ScriptTransfer(aF, dY, ag)), $Tuple2(dY, ey)) | |
813 | 887 | } | |
814 | 888 | } | |
815 | 889 | ||
816 | 890 | ||
817 | 891 | ||
818 | - | @Callable( | |
819 | - | func sellResourcesWorldREADONLY ( | |
820 | - | let | |
821 | - | $Tuple2(nil, | |
892 | + | @Callable(eo) | |
893 | + | func sellResourcesWorldREADONLY (bj) = { | |
894 | + | let dY = dN(bj)._2 | |
895 | + | $Tuple2(nil, dY) | |
822 | 896 | } | |
823 | 897 | ||
824 | 898 | ||
825 | 899 | ||
826 | - | @Callable( | |
827 | - | func sellResourcesDuckDelivery ( | |
900 | + | @Callable(eo) | |
901 | + | func sellResourcesDuckDelivery (cO,cP,eA) = if (!(ae)) | |
828 | 902 | then throw("Delivery feature is turned off!") | |
829 | 903 | else { | |
830 | - | let | |
831 | - | if (( | |
904 | + | let er = bH() | |
905 | + | if ((er == er)) | |
832 | 906 | then { | |
833 | - | let | |
834 | - | if ((size( | |
907 | + | let V = valueOrErrorMessage(getString(aE, S(toString(eo.caller))), "You don't have a duck staked") | |
908 | + | if ((size(eo.payments) != 0)) | |
835 | 909 | then throw("sellResources doesn't require any payments") | |
836 | 910 | else { | |
837 | - | let ec = bC(S(T)) | |
838 | - | let cK = split(ec[F], "_") | |
839 | - | let ek = cJ(cK, ej, cM, cN) | |
840 | - | let dS = ek._1 | |
841 | - | let ee = ek._2 | |
842 | - | let br = ek._3 | |
843 | - | let dT = ek._4 | |
844 | - | let ef = makeString_2C([ec[E], makeString(ee, "_"), ec[G], ec[H]], ":") | |
845 | - | let eg = aF(invoke(aC, "updateBackpack", [T, ef], nil)) | |
846 | - | let eh = aI(invoke(aC, "updateDuckStats", [T, fraction(a, dT, ak)], nil)) | |
847 | - | let el = fraction(br, aV, aj) | |
848 | - | let dU = if ((k > el)) | |
849 | - | then k | |
850 | - | else el | |
851 | - | let dV = (br / 100) | |
852 | - | if ((dU >= (br - dV))) | |
853 | - | then throw(("This trade does not cover delivery cost of " + aL(dU, 6))) | |
911 | + | let et = bE(U(V)) | |
912 | + | let cM = split(et[H], "_") | |
913 | + | let eB = cL(cM, eA, cO, cP) | |
914 | + | let dU = eB._1 | |
915 | + | let ev = eB._2 | |
916 | + | let bt = eB._3 | |
917 | + | let dV = eB._4 | |
918 | + | let ew = makeString_2C([et[G], makeString(ev, "_"), et[I], et[J]], ":") | |
919 | + | let ex = aH(invoke(aE, "updateBackpack", [V, ew], nil)) | |
920 | + | let ey = aK(invoke(aE, "updateDuckStats", [V, fraction(a, dV, am)], nil)) | |
921 | + | let eC = fraction(bt, aX, al) | |
922 | + | let dW = max([eC, k]) | |
923 | + | let dX = (bt / 100) | |
924 | + | if ((dW >= (bt - dX))) | |
925 | + | then throw(("This trade does not cover delivery cost of " + aN(dW, 6))) | |
854 | 926 | else { | |
855 | - | let | |
856 | - | $Tuple2(((( | |
927 | + | let eD = valueOrElse(getInteger(aa), 0) | |
928 | + | $Tuple2((((dU :+ ScriptTransfer(eo.caller, ((bt - dX) - dW), ag)) :+ IntegerEntry(aa, (eD + dW))) :+ ScriptTransfer(aD, dX, ag)), $Tuple3(ex, er, ey)) | |
857 | 929 | } | |
858 | 930 | } | |
859 | 931 | } | |
862 | 934 | ||
863 | 935 | ||
864 | 936 | ||
865 | - | @Callable( | |
866 | - | func sellResourcesLandDelivery ( | |
937 | + | @Callable(eo) | |
938 | + | func sellResourcesLandDelivery (cO,cP,Y,eA) = if (!(ae)) | |
867 | 939 | then throw("Delivery feature is turned off!") | |
868 | 940 | else { | |
869 | - | let | |
870 | - | if (( | |
871 | - | then if ((size( | |
941 | + | let er = bH() | |
942 | + | if ((er == er)) | |
943 | + | then if ((size(eo.payments) != 0)) | |
872 | 944 | then throw("sellResources doesn't require any payments") | |
873 | 945 | else { | |
874 | - | let | |
875 | - | let | |
876 | - | let | |
877 | - | if (!(isDefined(getInteger( | |
878 | - | then throw((("NFT " + | |
946 | + | let eE = eo.caller | |
947 | + | let R = toString(eE) | |
948 | + | let eF = value(assetInfo(fromBase58String(Y))) | |
949 | + | if (!(isDefined(getInteger(aE, P(Y))))) | |
950 | + | then throw((("NFT " + eF.name) + " is not staked")) | |
879 | 951 | else { | |
880 | - | let | |
881 | - | if (( | |
952 | + | let eG = valueOrErrorMessage(getString(aE, N(Y)), (("NFT " + eF.name) + " is orphaned")) | |
953 | + | if ((eG != R)) | |
882 | 954 | then throw((e + " is not yours")) | |
883 | 955 | else { | |
884 | - | let dz = aF(invoke(aC, "getWarehouseREADONLY", [W], nil)) | |
885 | - | let bY = split_4C(dz, ":") | |
886 | - | let cK = split(bY[y], "_") | |
887 | - | let eq = cJ(cK, ej, cM, cN) | |
888 | - | let dS = eq._1 | |
889 | - | let ee = eq._2 | |
890 | - | let br = eq._3 | |
891 | - | let dT = eq._4 | |
892 | - | let dH = makeString_2C([bY[x], makeString(ee, "_"), bY[z], bY[A], bY[B]], ":") | |
893 | - | let dJ = aF(invoke(aC, "saveWarehouse", [dH, W], nil)) | |
894 | - | let eh = aI(invoke(aC, "updateAccStats", [P, fraction(a, dT, ak)], nil)) | |
895 | - | let el = fraction(br, aV, aj) | |
896 | - | let dU = if ((k > el)) | |
897 | - | then k | |
898 | - | else el | |
899 | - | let dV = (br / 100) | |
900 | - | if ((dU >= (br - dV))) | |
901 | - | then throw(("This trade does not cover delivery cost of " + aL(dU, 6))) | |
956 | + | let dB = aH(invoke(aE, "getWarehouseREADONLY", [Y], nil)) | |
957 | + | let ca = split_4C(dB, ":") | |
958 | + | let cM = split(ca[A], "_") | |
959 | + | let eH = cL(cM, eA, cO, cP) | |
960 | + | let dU = eH._1 | |
961 | + | let ev = eH._2 | |
962 | + | let bt = eH._3 | |
963 | + | let dV = eH._4 | |
964 | + | let dJ = makeString_2C([ca[z], makeString(ev, "_"), ca[B], ca[C], ca[D]], ":") | |
965 | + | let dL = aH(invoke(aE, "saveWarehouse", [dJ, Y], nil)) | |
966 | + | let ey = aK(invoke(aE, "updateAccStats", [R, fraction(a, dV, am)], nil)) | |
967 | + | let eC = fraction(bt, aX, al) | |
968 | + | let dW = max([eC, k]) | |
969 | + | let dX = (bt / 100) | |
970 | + | if ((dW >= (bt - dX))) | |
971 | + | then throw(("This trade does not cover delivery cost of " + aN(dW, 6))) | |
902 | 972 | else { | |
903 | - | let | |
904 | - | $Tuple2(((( | |
973 | + | let eD = valueOrElse(getInteger(aa), 0) | |
974 | + | $Tuple2((((dU :+ ScriptTransfer(eo.caller, ((bt - dX) - dW), ag)) :+ IntegerEntry(aa, (eD + dW))) :+ ScriptTransfer(aD, dX, ag)), $Tuple3(dL, er, ey)) | |
905 | 975 | } | |
906 | 976 | } | |
907 | 977 | } | |
911 | 981 | ||
912 | 982 | ||
913 | 983 | ||
914 | - | @Callable( | |
915 | - | func buyMaterials ( | |
916 | - | let | |
917 | - | if (( | |
984 | + | @Callable(eo) | |
985 | + | func buyMaterials (cO,cU) = { | |
986 | + | let er = bH() | |
987 | + | if ((er == er)) | |
918 | 988 | then { | |
919 | - | let | |
920 | - | if ((size( | |
989 | + | let V = valueOrErrorMessage(getString(aE, S(toString(eo.caller))), "You don't have a duck staked") | |
990 | + | if ((size(eo.payments) != 1)) | |
921 | 991 | then throw("exactly 1 payment must be attached") | |
922 | 992 | else { | |
923 | - | let | |
924 | - | let | |
925 | - | if (if (!(isDefined( | |
993 | + | let dm = eo.payments[0] | |
994 | + | let dn = dm.amount | |
995 | + | if (if (!(isDefined(dm.assetId))) | |
926 | 996 | then true | |
927 | - | else (value( | |
997 | + | else (value(dm.assetId) != ag)) | |
928 | 998 | then throw("USDT payments only!") | |
929 | 999 | else { | |
930 | - | let | |
931 | - | if (( | |
932 | - | then throw(("Duck location type should be Factory, but is " + | |
1000 | + | let es = split(valueOrElse(getString(aE, W(V)), g), "_") | |
1001 | + | if ((es[L] != "F")) | |
1002 | + | then throw(("Duck location type should be Factory, but is " + es[L])) | |
933 | 1003 | else { | |
934 | - | let | |
935 | - | let | |
936 | - | let | |
937 | - | let | |
938 | - | let | |
939 | - | let | |
940 | - | let | |
941 | - | if (( | |
942 | - | then throw(((("Insufficient payment! Attached=" + | |
1004 | + | let et = bE(U(V)) | |
1005 | + | let cT = split(et[I], "_") | |
1006 | + | let eI = cS(cT, es[M], cO, cU) | |
1007 | + | let dU = eI._1 | |
1008 | + | let eJ = eI._2 | |
1009 | + | let bC = eI._3 | |
1010 | + | let eK = eI._4 | |
1011 | + | if ((bC > dn)) | |
1012 | + | then throw(((("Insufficient payment! Attached=" + aN(dn, 6)) + ", required=") + aN(bC, 6))) | |
943 | 1013 | else { | |
944 | - | let | |
945 | - | let | |
946 | - | let | |
947 | - | then [ScriptTransfer( | |
1014 | + | let ew = makeString([et[G], et[H], makeString(eJ, "_"), et[J]], ":") | |
1015 | + | let ex = aH(invoke(aE, "updateBackpack", [V, ew], nil)) | |
1016 | + | let az = if (((dn - bC) > 0)) | |
1017 | + | then [ScriptTransfer(eo.caller, (dn - bC), ag)] | |
948 | 1018 | else nil | |
949 | - | let | |
950 | - | let | |
951 | - | $Tuple2((( | |
1019 | + | let dX = (bC / 100) | |
1020 | + | let ey = aK(invoke(aE, "updateDuckStats", [V, fraction(a, eK, am)], nil)) | |
1021 | + | $Tuple2(((dU ++ az) :+ ScriptTransfer(aD, dX, ag)), $Tuple3(ex, er, ey)) | |
952 | 1022 | } | |
953 | 1023 | } | |
954 | 1024 | } | |
959 | 1029 | ||
960 | 1030 | ||
961 | 1031 | ||
962 | - | @Callable( | |
963 | - | func buyMaterialsDuckDelivery ( | |
1032 | + | @Callable(eo) | |
1033 | + | func buyMaterialsDuckDelivery (cO,cU,eA) = if (!(ae)) | |
964 | 1034 | then throw("Delivery feature is turned off!") | |
965 | 1035 | else { | |
966 | - | let | |
967 | - | if (( | |
1036 | + | let er = bH() | |
1037 | + | if ((er == er)) | |
968 | 1038 | then { | |
969 | - | let | |
970 | - | if ((size( | |
1039 | + | let V = valueOrErrorMessage(getString(aE, S(toString(eo.caller))), "You don't have a duck staked") | |
1040 | + | if ((size(eo.payments) != 1)) | |
971 | 1041 | then throw("exactly 1 payment must be attached") | |
972 | 1042 | else { | |
973 | - | let | |
974 | - | let | |
975 | - | if (if (!(isDefined( | |
1043 | + | let dm = eo.payments[0] | |
1044 | + | let dn = dm.amount | |
1045 | + | if (if (!(isDefined(dm.assetId))) | |
976 | 1046 | then true | |
977 | - | else (value( | |
1047 | + | else (value(dm.assetId) != ag)) | |
978 | 1048 | then throw("USDT payments only!") | |
979 | 1049 | else { | |
980 | - | let ec = bC(S(T)) | |
981 | - | let cR = split(ec[G], "_") | |
982 | - | let eu = cQ(cR, ej, cM, cS) | |
983 | - | let dS = eu._1 | |
984 | - | let es = eu._2 | |
985 | - | let bA = eu._3 | |
986 | - | let et = eu._4 | |
987 | - | let ef = makeString([ec[E], ec[F], makeString(es, "_"), ec[H]], ":") | |
988 | - | let eg = aF(invoke(aC, "updateBackpack", [T, ef], nil)) | |
989 | - | let eh = aI(invoke(aC, "updateDuckStats", [T, fraction(a, et, ak)], nil)) | |
990 | - | let el = fraction(bA, aV, aj) | |
991 | - | let dU = if ((k > el)) | |
992 | - | then k | |
993 | - | else el | |
994 | - | let dm = (bA + dU) | |
995 | - | if ((dm > dl)) | |
996 | - | then throw((((((("Insufficient payment! Attached=" + aL(dl, 6)) + ", required=") + aL(bA, 6)) + "+") + aL(dU, 6)) + "(delivery fee)")) | |
1050 | + | let et = bE(U(V)) | |
1051 | + | let cT = split(et[I], "_") | |
1052 | + | let eL = cS(cT, eA, cO, cU) | |
1053 | + | let dU = eL._1 | |
1054 | + | let eJ = eL._2 | |
1055 | + | let bC = eL._3 | |
1056 | + | let eK = eL._4 | |
1057 | + | let ew = makeString([et[G], et[H], makeString(eJ, "_"), et[J]], ":") | |
1058 | + | let ex = aH(invoke(aE, "updateBackpack", [V, ew], nil)) | |
1059 | + | let ey = aK(invoke(aE, "updateDuckStats", [V, fraction(a, eK, am)], nil)) | |
1060 | + | let eC = fraction(bC, aX, al) | |
1061 | + | let dW = max([eC, k]) | |
1062 | + | let do = (bC + dW) | |
1063 | + | if ((do > dn)) | |
1064 | + | then throw((((((("Insufficient payment! Attached=" + aN(dn, 6)) + ", required=") + aN(bC, 6)) + "+") + aN(dW, 6)) + "(delivery fee)")) | |
997 | 1065 | else { | |
998 | - | let | |
999 | - | then [ScriptTransfer( | |
1066 | + | let az = if (((dn - do) > 0)) | |
1067 | + | then [ScriptTransfer(eo.caller, (dn - do), ag)] | |
1000 | 1068 | else nil | |
1001 | - | let | |
1002 | - | let | |
1003 | - | $Tuple2(((( | |
1069 | + | let dX = (bC / 100) | |
1070 | + | let eD = valueOrElse(getInteger(aa), 0) | |
1071 | + | $Tuple2((((dU ++ az) :+ ScriptTransfer(aD, dX, ag)) :+ IntegerEntry(aa, (eD + dW))), $Tuple3(ex, er, ey)) | |
1004 | 1072 | } | |
1005 | 1073 | } | |
1006 | 1074 | } | |
1010 | 1078 | ||
1011 | 1079 | ||
1012 | 1080 | ||
1013 | - | @Callable( | |
1014 | - | func buyMaterialsLandDelivery ( | |
1081 | + | @Callable(eo) | |
1082 | + | func buyMaterialsLandDelivery (cO,cU,Y,eA) = if (!(ae)) | |
1015 | 1083 | then throw("Delivery feature is turned off!") | |
1016 | 1084 | else { | |
1017 | - | let | |
1018 | - | if (( | |
1019 | - | then if ((size( | |
1085 | + | let er = bH() | |
1086 | + | if ((er == er)) | |
1087 | + | then if ((size(eo.payments) != 1)) | |
1020 | 1088 | then throw("exactly 1 payment must be attached") | |
1021 | 1089 | else { | |
1022 | - | let | |
1023 | - | let | |
1024 | - | if (if (!(isDefined( | |
1090 | + | let dm = eo.payments[0] | |
1091 | + | let dn = dm.amount | |
1092 | + | if (if (!(isDefined(dm.assetId))) | |
1025 | 1093 | then true | |
1026 | - | else (value( | |
1094 | + | else (value(dm.assetId) != ag)) | |
1027 | 1095 | then throw("USDT payments only!") | |
1028 | 1096 | else { | |
1029 | - | let | |
1030 | - | let | |
1031 | - | let | |
1032 | - | if (!(isDefined(getInteger( | |
1033 | - | then throw((("NFT " + | |
1097 | + | let eE = eo.caller | |
1098 | + | let R = toString(eE) | |
1099 | + | let eF = value(assetInfo(fromBase58String(Y))) | |
1100 | + | if (!(isDefined(getInteger(aE, P(Y))))) | |
1101 | + | then throw((("NFT " + eF.name) + " is not staked")) | |
1034 | 1102 | else { | |
1035 | - | let | |
1036 | - | if (( | |
1103 | + | let eG = valueOrErrorMessage(getString(aE, N(Y)), (("NFT " + eF.name) + " is orphaned")) | |
1104 | + | if ((eG != R)) | |
1037 | 1105 | then throw((e + " is not yours")) | |
1038 | 1106 | else { | |
1039 | - | let dz = aF(invoke(aC, "getWarehouseREADONLY", [W], nil)) | |
1040 | - | let bY = split_4C(dz, ":") | |
1041 | - | let cR = split(bY[z], "_") | |
1042 | - | let ev = cQ(cR, ej, cM, cS) | |
1043 | - | let dS = ev._1 | |
1044 | - | let es = ev._2 | |
1045 | - | let bA = ev._3 | |
1046 | - | let et = ev._4 | |
1047 | - | let dH = makeString_2C([bY[x], bY[y], makeString(es, "_"), bY[A], bY[B]], ":") | |
1048 | - | let dJ = aF(invoke(aC, "saveWarehouse", [dH, W], nil)) | |
1049 | - | let eh = aI(invoke(aC, "updateAccStats", [P, fraction(a, et, ak)], nil)) | |
1050 | - | let el = fraction(bA, aV, aj) | |
1051 | - | let dU = if ((k > el)) | |
1052 | - | then k | |
1053 | - | else el | |
1054 | - | let dm = (bA + dU) | |
1055 | - | if ((dm > dl)) | |
1056 | - | then throw((((((("Insufficient payment! Attached=" + aL(dl, 6)) + ", required=") + aL(bA, 6)) + "+") + aL(dU, 6)) + "(delivery fee)")) | |
1107 | + | let dB = aH(invoke(aE, "getWarehouseREADONLY", [Y], nil)) | |
1108 | + | let ca = split_4C(dB, ":") | |
1109 | + | let cT = split(ca[B], "_") | |
1110 | + | let eM = cS(cT, eA, cO, cU) | |
1111 | + | let dU = eM._1 | |
1112 | + | let eJ = eM._2 | |
1113 | + | let bC = eM._3 | |
1114 | + | let eK = eM._4 | |
1115 | + | let dJ = makeString_2C([ca[z], ca[A], makeString(eJ, "_"), ca[C], ca[D]], ":") | |
1116 | + | let dL = aH(invoke(aE, "saveWarehouse", [dJ, Y], nil)) | |
1117 | + | let ey = aK(invoke(aE, "updateAccStats", [R, fraction(a, eK, am)], nil)) | |
1118 | + | let eC = fraction(bC, aX, al) | |
1119 | + | let dW = max([eC, k]) | |
1120 | + | let do = (bC + dW) | |
1121 | + | if ((do > dn)) | |
1122 | + | then throw((((((("Insufficient payment! Attached=" + aN(dn, 6)) + ", required=") + aN(bC, 6)) + "+") + aN(dW, 6)) + "(delivery fee)")) | |
1057 | 1123 | else { | |
1058 | - | let | |
1059 | - | then [ScriptTransfer( | |
1124 | + | let az = if (((dn - do) > 0)) | |
1125 | + | then [ScriptTransfer(eo.caller, (dn - do), ag)] | |
1060 | 1126 | else nil | |
1061 | - | let | |
1062 | - | let | |
1063 | - | $Tuple2(((( | |
1127 | + | let dX = (bC / 100) | |
1128 | + | let eD = valueOrElse(getInteger(aa), 0) | |
1129 | + | $Tuple2((((dU ++ az) :+ ScriptTransfer(aD, dX, ag)) :+ IntegerEntry(aa, (eD + dW))), $Tuple3(dL, er, ey)) | |
1064 | 1130 | } | |
1065 | 1131 | } | |
1066 | 1132 | } | |
1071 | 1137 | ||
1072 | 1138 | ||
1073 | 1139 | ||
1074 | - | @Callable( | |
1075 | - | func exchangeResources ( | |
1076 | - | let | |
1077 | - | if (( | |
1140 | + | @Callable(eo) | |
1141 | + | func exchangeResources (cO) = { | |
1142 | + | let er = bH() | |
1143 | + | if ((er == er)) | |
1078 | 1144 | then { | |
1079 | - | let | |
1080 | - | if ((size( | |
1145 | + | let V = valueOrErrorMessage(getString(aE, S(toString(eo.caller))), "You don't have a duck staked") | |
1146 | + | if ((size(eo.payments) != 1)) | |
1081 | 1147 | then throw("exactly 1 payment must be attached") | |
1082 | 1148 | else { | |
1083 | - | let | |
1084 | - | let | |
1085 | - | if (if (!(isDefined( | |
1149 | + | let dm = eo.payments[0] | |
1150 | + | let dn = dm.amount | |
1151 | + | if (if (!(isDefined(dm.assetId))) | |
1086 | 1152 | then true | |
1087 | - | else (value( | |
1153 | + | else (value(dm.assetId) != ag)) | |
1088 | 1154 | then throw("USDT payments only!") | |
1089 | 1155 | else { | |
1090 | - | let | |
1091 | - | if (( | |
1092 | - | then throw(("Duck location type should be Factory, but is " + | |
1156 | + | let es = split(valueOrElse(getString(aE, W(V)), g), "_") | |
1157 | + | if ((es[L] != "F")) | |
1158 | + | then throw(("Duck location type should be Factory, but is " + es[L])) | |
1093 | 1159 | else { | |
1094 | - | let | |
1095 | - | let | |
1096 | - | let | |
1097 | - | let | |
1098 | - | let | |
1099 | - | let | |
1100 | - | let | |
1101 | - | let | |
1102 | - | if (( | |
1103 | - | then throw(((("Insufficient payment! Attached=" + | |
1160 | + | let et = bE(U(V)) | |
1161 | + | let cM = split(et[H], "_") | |
1162 | + | let cT = split(et[I], "_") | |
1163 | + | let eN = cW(cM, cT, cO) | |
1164 | + | let ev = eN._1 | |
1165 | + | let eJ = eN._2 | |
1166 | + | let bC = eN._3 | |
1167 | + | let eO = eN._4 | |
1168 | + | if ((bC > dn)) | |
1169 | + | then throw(((("Insufficient payment! Attached=" + aN(dn, 6)) + ", required=") + aN(bC, 6))) | |
1104 | 1170 | else { | |
1105 | - | let | |
1106 | - | let | |
1107 | - | let | |
1108 | - | then [ScriptTransfer( | |
1171 | + | let ew = makeString([et[G], makeString(ev, "_"), makeString(eJ, "_"), et[J]], ":") | |
1172 | + | let ex = aH(invoke(aE, "updateBackpack", [V, ew], nil)) | |
1173 | + | let az = if (((dn - bC) > 0)) | |
1174 | + | then [ScriptTransfer(eo.caller, (dn - bC), ag)] | |
1109 | 1175 | else nil | |
1110 | - | let | |
1111 | - | let | |
1112 | - | $Tuple2(( | |
1176 | + | let dX = (bC / 100) | |
1177 | + | let ey = aK(invoke(aE, "updateDuckStats", [V, fraction(a, eO, am)], nil)) | |
1178 | + | $Tuple2((az :+ ScriptTransfer(aD, dX, ag)), $Tuple3(ex, er, ey)) | |
1113 | 1179 | } | |
1114 | 1180 | } | |
1115 | 1181 | } | |
1120 | 1186 | ||
1121 | 1187 | ||
1122 | 1188 | ||
1123 | - | @Callable( | |
1124 | - | func exchangeResourcesDuckDelivery ( | |
1189 | + | @Callable(eo) | |
1190 | + | func exchangeResourcesDuckDelivery (cO) = if (!(ae)) | |
1125 | 1191 | then throw("Delivery feature is turned off!") | |
1126 | 1192 | else { | |
1127 | - | let | |
1128 | - | if (( | |
1193 | + | let er = bH() | |
1194 | + | if ((er == er)) | |
1129 | 1195 | then { | |
1130 | - | let | |
1131 | - | if ((size( | |
1196 | + | let V = valueOrErrorMessage(getString(aE, S(toString(eo.caller))), "You don't have a duck staked") | |
1197 | + | if ((size(eo.payments) != 1)) | |
1132 | 1198 | then throw("exactly 1 payment must be attached") | |
1133 | 1199 | else { | |
1134 | - | let | |
1135 | - | let | |
1136 | - | if (if (!(isDefined( | |
1200 | + | let dm = eo.payments[0] | |
1201 | + | let dn = dm.amount | |
1202 | + | if (if (!(isDefined(dm.assetId))) | |
1137 | 1203 | then true | |
1138 | - | else (value( | |
1204 | + | else (value(dm.assetId) != ag)) | |
1139 | 1205 | then throw("USDT payments only!") | |
1140 | 1206 | else { | |
1141 | - | let ec = bC(S(T)) | |
1142 | - | let cK = split(ec[F], "_") | |
1143 | - | let cR = split(ec[G], "_") | |
1144 | - | let ey = cU(cK, cR, cM) | |
1145 | - | let ee = ey._1 | |
1146 | - | let es = ey._2 | |
1147 | - | let bA = ey._3 | |
1148 | - | let ex = ey._4 | |
1149 | - | let el = fraction(bA, aW, aj) | |
1150 | - | let dU = if ((l > el)) | |
1151 | - | then l | |
1152 | - | else el | |
1153 | - | let dm = (bA + dU) | |
1154 | - | if ((dm > dl)) | |
1155 | - | then throw((((((("Insufficient payment! Attached=" + aL(dl, 6)) + ", required=") + aL(bA, 6)) + "+") + aL(dU, 6)) + "(delivery fee)")) | |
1207 | + | let et = bE(U(V)) | |
1208 | + | let cM = split(et[H], "_") | |
1209 | + | let cT = split(et[I], "_") | |
1210 | + | let eP = cW(cM, cT, cO) | |
1211 | + | let ev = eP._1 | |
1212 | + | let eJ = eP._2 | |
1213 | + | let bC = eP._3 | |
1214 | + | let eO = eP._4 | |
1215 | + | let eC = fraction(bC, aY, al) | |
1216 | + | let dW = max([eC, l]) | |
1217 | + | let do = (bC + dW) | |
1218 | + | if ((do > dn)) | |
1219 | + | then throw((((((("Insufficient payment! Attached=" + aN(dn, 6)) + ", required=") + aN(bC, 6)) + "+") + aN(dW, 6)) + "(delivery fee)")) | |
1156 | 1220 | else { | |
1157 | - | let | |
1158 | - | let | |
1159 | - | let | |
1160 | - | then [ScriptTransfer( | |
1221 | + | let ew = makeString([et[G], makeString(ev, "_"), makeString(eJ, "_"), et[J]], ":") | |
1222 | + | let ex = aH(invoke(aE, "updateBackpack", [V, ew], nil)) | |
1223 | + | let az = if (((dn - do) > 0)) | |
1224 | + | then [ScriptTransfer(eo.caller, (dn - do), ag)] | |
1161 | 1225 | else nil | |
1162 | - | let | |
1163 | - | let | |
1164 | - | let | |
1165 | - | $Tuple2((( | |
1226 | + | let dX = (bC / 100) | |
1227 | + | let ey = aK(invoke(aE, "updateDuckStats", [V, fraction(a, eO, am)], nil)) | |
1228 | + | let eD = valueOrElse(getInteger(aa), 0) | |
1229 | + | $Tuple2(((az :+ ScriptTransfer(aD, dX, ag)) :+ IntegerEntry(aa, (eD + dW))), $Tuple3(ex, er, ey)) | |
1166 | 1230 | } | |
1167 | 1231 | } | |
1168 | 1232 | } | |
1172 | 1236 | ||
1173 | 1237 | ||
1174 | 1238 | ||
1175 | - | @Callable( | |
1176 | - | func exchangeResourcesLandDelivery ( | |
1239 | + | @Callable(eo) | |
1240 | + | func exchangeResourcesLandDelivery (cO,Y) = if (!(ae)) | |
1177 | 1241 | then throw("Delivery feature is turned off!") | |
1178 | 1242 | else { | |
1179 | - | let | |
1180 | - | if (( | |
1181 | - | then if ((size( | |
1243 | + | let er = bH() | |
1244 | + | if ((er == er)) | |
1245 | + | then if ((size(eo.payments) != 1)) | |
1182 | 1246 | then throw("exactly 1 payment must be attached") | |
1183 | 1247 | else { | |
1184 | - | let | |
1185 | - | let | |
1186 | - | if (if (!(isDefined( | |
1248 | + | let dm = eo.payments[0] | |
1249 | + | let dn = dm.amount | |
1250 | + | if (if (!(isDefined(dm.assetId))) | |
1187 | 1251 | then true | |
1188 | - | else (value( | |
1252 | + | else (value(dm.assetId) != ag)) | |
1189 | 1253 | then throw("USDT payments only!") | |
1190 | 1254 | else { | |
1191 | - | let | |
1192 | - | let | |
1193 | - | let | |
1194 | - | if (!(isDefined(getInteger( | |
1195 | - | then throw((("NFT " + | |
1255 | + | let eE = eo.caller | |
1256 | + | let R = toString(eE) | |
1257 | + | let eF = value(assetInfo(fromBase58String(Y))) | |
1258 | + | if (!(isDefined(getInteger(aE, P(Y))))) | |
1259 | + | then throw((("NFT " + eF.name) + " is not staked")) | |
1196 | 1260 | else { | |
1197 | - | let | |
1198 | - | if (( | |
1261 | + | let eG = valueOrErrorMessage(getString(aE, N(Y)), (("NFT " + eF.name) + " is orphaned")) | |
1262 | + | if ((eG != R)) | |
1199 | 1263 | then throw((e + " is not yours")) | |
1200 | 1264 | else { | |
1201 | - | let dz = aF(invoke(aC, "getWarehouseREADONLY", [W], nil)) | |
1202 | - | let bY = split_4C(dz, ":") | |
1203 | - | let cK = split(bY[y], "_") | |
1204 | - | let cR = split(bY[z], "_") | |
1205 | - | let ez = cU(cK, cR, cM) | |
1206 | - | let ee = ez._1 | |
1207 | - | let es = ez._2 | |
1208 | - | let bA = ez._3 | |
1209 | - | let ex = ez._4 | |
1210 | - | let dH = makeString_2C([bY[x], makeString(ee, "_"), makeString(es, "_"), bY[A], bY[B]], ":") | |
1211 | - | let dJ = aF(invoke(aC, "saveWarehouse", [dH, W], nil)) | |
1212 | - | let eh = aI(invoke(aC, "updateAccStats", [P, fraction(a, ex, ak)], nil)) | |
1213 | - | let el = fraction(bA, aW, aj) | |
1214 | - | let dU = if ((l > el)) | |
1215 | - | then l | |
1216 | - | else el | |
1217 | - | let dm = (bA + dU) | |
1218 | - | if ((dm > dl)) | |
1219 | - | then throw((((((("Insufficient payment! Attached=" + aL(dl, 6)) + ", required=") + aL(bA, 6)) + "+") + aL(dU, 6)) + "(delivery fee)")) | |
1265 | + | let dB = aH(invoke(aE, "getWarehouseREADONLY", [Y], nil)) | |
1266 | + | let ca = split_4C(dB, ":") | |
1267 | + | let cM = split(ca[A], "_") | |
1268 | + | let cT = split(ca[B], "_") | |
1269 | + | let eQ = cW(cM, cT, cO) | |
1270 | + | let ev = eQ._1 | |
1271 | + | let eJ = eQ._2 | |
1272 | + | let bC = eQ._3 | |
1273 | + | let eO = eQ._4 | |
1274 | + | let dJ = makeString_2C([ca[z], makeString(ev, "_"), makeString(eJ, "_"), ca[C], ca[D]], ":") | |
1275 | + | let dL = aH(invoke(aE, "saveWarehouse", [dJ, Y], nil)) | |
1276 | + | let ey = aK(invoke(aE, "updateAccStats", [R, fraction(a, eO, am)], nil)) | |
1277 | + | let eC = fraction(bC, aY, al) | |
1278 | + | let dW = max([eC, l]) | |
1279 | + | let do = (bC + dW) | |
1280 | + | if ((do > dn)) | |
1281 | + | then throw((((((("Insufficient payment! Attached=" + aN(dn, 6)) + ", required=") + aN(bC, 6)) + "+") + aN(dW, 6)) + "(delivery fee)")) | |
1220 | 1282 | else { | |
1221 | - | let | |
1222 | - | then [ScriptTransfer( | |
1283 | + | let az = if (((dn - do) > 0)) | |
1284 | + | then [ScriptTransfer(eo.caller, (dn - do), ag)] | |
1223 | 1285 | else nil | |
1224 | - | let | |
1225 | - | let | |
1226 | - | $Tuple2((( | |
1286 | + | let dX = (bC / 100) | |
1287 | + | let eD = valueOrElse(getInteger(aa), 0) | |
1288 | + | $Tuple2(((az :+ ScriptTransfer(aD, dX, ag)) :+ IntegerEntry(aa, (eD + dW))), $Tuple3(dL, er, ey)) | |
1227 | 1289 | } | |
1228 | 1290 | } | |
1229 | 1291 | } | |
1234 | 1296 | ||
1235 | 1297 | ||
1236 | 1298 | ||
1237 | - | @Callable( | |
1238 | - | func craftGoods ( | |
1239 | - | let | |
1240 | - | if (( | |
1241 | - | then if ((size( | |
1299 | + | @Callable(eo) | |
1300 | + | func craftGoods (ec,ed) = { | |
1301 | + | let er = bH() | |
1302 | + | if ((er == er)) | |
1303 | + | then if ((size(eo.payments) != 1)) | |
1242 | 1304 | then throw("exactly 1 payment must be attached") | |
1243 | 1305 | else { | |
1244 | - | let dk = dX.payments[0] | |
1245 | - | let dl = dk.amount | |
1246 | - | let eC = valueOrErrorMessage(dk.assetId, "WAVES can't be used as payment") | |
1247 | - | if ((eC != ae)) | |
1306 | + | let dm = eo.payments[0] | |
1307 | + | let dn = dm.amount | |
1308 | + | if (if (!(isDefined(dm.assetId))) | |
1309 | + | then true | |
1310 | + | else (value(dm.assetId) != ag)) | |
1248 | 1311 | then throw("USDT payments only!") | |
1249 | - | else if ((dl != aj)) | |
1250 | - | then throw("exactly 1 USDT must be attached as payment") | |
1251 | - | else if ((0 >= eB)) | |
1252 | - | then throw("Quantity should be positive") | |
1253 | - | else { | |
1254 | - | let T = valueOrErrorMessage(getString(aC, Q(toString(dX.caller))), "You don't have a duck staked") | |
1255 | - | let eb = split(valueOrElse(getString(aC, U(T)), g), "_") | |
1256 | - | if ((eb[J] != "M")) | |
1257 | - | then throw(("Duck location type should be Manufactory, but is " + eb[J])) | |
1258 | - | else { | |
1259 | - | let eD = eb[I] | |
1260 | - | let ec = bC(S(T)) | |
1261 | - | let cR = split(ec[G], "_") | |
1262 | - | if (if ((0 > eA)) | |
1263 | - | then true | |
1264 | - | else (eA >= size(s))) | |
1265 | - | then throw(("Unknown product idx=" + toString(eA))) | |
1266 | - | else { | |
1267 | - | let ab = split(s[eA], "_") | |
1268 | - | if ((size(ab) != v)) | |
1269 | - | then throw(("Fatal: unknown recipe: " + s[eA])) | |
1270 | - | else { | |
1271 | - | let eE = parseIntValue(ab[u]) | |
1272 | - | if ((q[eE] != eD)) | |
1273 | - | then throw(((("This product is available in " + q[eE]) + ", but you are in ") + eD)) | |
1274 | - | else { | |
1275 | - | let eF = if ((ec[H] == "")) | |
1276 | - | then nil | |
1277 | - | else split_4C(ec[H], "_") | |
1278 | - | func eG (bH,eH) = { | |
1279 | - | let aJ = bH._2 | |
1280 | - | let eI = if ((size(eF) > aJ)) | |
1281 | - | then eF[aJ] | |
1282 | - | else "0" | |
1283 | - | let dQ = parseIntValue(eI) | |
1284 | - | let bh = (eB * w) | |
1285 | - | let eJ = if ((aJ == eA)) | |
1286 | - | then toString((dQ + bh)) | |
1287 | - | else eI | |
1288 | - | $Tuple2((bH._1 :+ eJ), (aJ + 1)) | |
1289 | - | } | |
1290 | - | ||
1291 | - | let eK = ( let cl = s | |
1292 | - | let cm = size(cl) | |
1293 | - | let cn = $Tuple2(nil, 0) | |
1294 | - | func co (cp,cq) = if ((cq >= cm)) | |
1295 | - | then cp | |
1296 | - | else eG(cp, cl[cq]) | |
1297 | - | ||
1298 | - | func cr (cp,cq) = if ((cq >= cm)) | |
1299 | - | then cp | |
1300 | - | else throw("List size exceeds 50") | |
1301 | - | ||
1302 | - | cr(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(cn, 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 | |
1303 | - | func eL (bH,bJ) = { | |
1304 | - | let eM = (((parseIntValue(ab[bJ]) * ai) * eB) * parseIntValue(ab[t])) | |
1305 | - | let eN = parseIntValue(cR[bJ]) | |
1306 | - | if ((eM > eN)) | |
1307 | - | then throw(((((((("You have " + aL(eN, 8)) + " of ") + o[bJ]) + ", but recipe requires ") + aL(eM, 8)) + " for quantity ") + toString(eB))) | |
1308 | - | else if ((eM > 0)) | |
1309 | - | then $Tuple2((bH._1 :+ toString((eN - eM))), (bH._2 + eM)) | |
1310 | - | else $Tuple2((bH._1 :+ cR[bJ]), bH._2) | |
1311 | - | } | |
1312 | - | ||
1313 | - | let eO = { | |
1314 | - | let cl = an | |
1315 | - | let cm = size(cl) | |
1316 | - | let cn = $Tuple2(nil, 0) | |
1317 | - | func cs (cp,cq) = if ((cq >= cm)) | |
1318 | - | then cp | |
1319 | - | else eL(cp, cl[cq]) | |
1320 | - | ||
1321 | - | func ct (cp,cq) = if ((cq >= cm)) | |
1322 | - | then cp | |
1323 | - | else throw("List size exceeds 6") | |
1324 | - | ||
1325 | - | ct(cs(cs(cs(cs(cs(cs(cn, 0), 1), 2), 3), 4), 5), 6) | |
1326 | - | } | |
1327 | - | let ef = makeString([ec[E], ec[F], makeString(eO._1, "_"), makeString_2C(eK, "_")], ":") | |
1328 | - | let eP = aF(invoke(aC, "updateBackpack", [T, ef], nil)) | |
1329 | - | let eh = aI(invoke(aC, "updateDuckStats", [T, fraction(b, eO._2, ak)], nil)) | |
1330 | - | $Tuple2(nil, $Tuple3(eP, ea, eh)) | |
1331 | - | } | |
1332 | - | } | |
1333 | - | } | |
1334 | - | } | |
1335 | - | } | |
1312 | + | else if ((dn != al)) | |
1313 | + | then throw((("exactly " + aN(m, 6)) + " USDT must be attached as payment")) | |
1314 | + | else { | |
1315 | + | let V = valueOrErrorMessage(getString(aE, S(toString(eo.caller))), "You don't have a duck staked") | |
1316 | + | let es = split(valueOrElse(getString(aE, W(V)), g), "_") | |
1317 | + | if ((es[L] != "M")) | |
1318 | + | then throw(("Duck location type should be Manufactory, but is " + es[L])) | |
1319 | + | else { | |
1320 | + | let eR = es[K] | |
1321 | + | let et = bE(U(V)) | |
1322 | + | let cT = split(et[I], "_") | |
1323 | + | let ea = if ((et[J] == "")) | |
1324 | + | then nil | |
1325 | + | else split_4C(et[J], "_") | |
1326 | + | let eS = dZ(cT, ea, eR, ec, ed) | |
1327 | + | let eJ = eS._1 | |
1328 | + | let ej = eS._2 | |
1329 | + | let eT = eS._3 | |
1330 | + | let ew = makeString([et[G], et[H], makeString(eJ, "_"), makeString_2C(ej, "_")], ":") | |
1331 | + | let eU = aH(invoke(aE, "updateBackpack", [V, ew], nil)) | |
1332 | + | let ey = aK(invoke(aE, "updateDuckStats", [V, fraction(b, eT, am)], nil)) | |
1333 | + | $Tuple2(nil, $Tuple3(eU, er, ey)) | |
1334 | + | } | |
1335 | + | } | |
1336 | 1336 | } | |
1337 | 1337 | else throw("Strict value is not equal to itself.") | |
1338 | 1338 | } | |
1339 | 1339 | ||
1340 | 1340 | ||
1341 | 1341 | ||
1342 | - | @Callable(dX) | |
1343 | - | func setWarehouseOrder (eQ,W) = { | |
1344 | - | let en = dX.originCaller | |
1345 | - | let P = toString(en) | |
1346 | - | let eP = if ((en != aB)) | |
1347 | - | then bE() | |
1348 | - | else false | |
1349 | - | let eo = value(assetInfo(fromBase58String(W))) | |
1350 | - | if (!(isDefined(getInteger(aC, N(W))))) | |
1351 | - | then throw((("NFT " + eo.name) + " is not staked")) | |
1352 | - | else { | |
1353 | - | let ep = valueOrErrorMessage(getString(aC, L(W)), (("NFT " + eo.name) + " is orphaned")) | |
1354 | - | if (if ((en != aB)) | |
1355 | - | then (ep != P) | |
1356 | - | else false) | |
1357 | - | then throw((e + " is not yours")) | |
1358 | - | else { | |
1359 | - | let eR = split_4C(eQ, ":") | |
1360 | - | let dz = aF(invoke(aC, "getWarehouseREADONLY", [W], nil)) | |
1361 | - | let bY = split_4C(dz, ":") | |
1362 | - | let eS = split(bY[B], "_") | |
1363 | - | let eT = parseIntValue(eS[D]) | |
1364 | - | let be = V(W) | |
1365 | - | let bZ = bd(be) | |
1366 | - | let dY = bX(bY, bZ, eR) | |
1367 | - | let eU = dY._4 | |
1368 | - | let eV = dY._5 | |
1369 | - | let eW = dY._7 | |
1370 | - | let eX = (eU + eV) | |
1371 | - | let eY = ((eT - eW) - eX) | |
1372 | - | if ((0 > eY)) | |
1373 | - | then throw((((((("Attempt to reserve " + toString(eU)) + " space for buy orders, and ") + toString(eV)) + " space for sell orders (and occupied=") + toString(eW)) + "), leads to negative free space")) | |
1374 | - | else { | |
1375 | - | let dH = makeString_2C([bY[x], makeString(dY._1, "_"), makeString(dY._2, "_"), makeString_2C(dY._3, "_"), toString(eX)], ":") | |
1376 | - | let dJ = aF(invoke(aC, "saveWarehouse", [dH, W], nil)) | |
1377 | - | let eZ = dY._6 | |
1378 | - | let fa = if ((eZ > 0)) | |
1379 | - | then if ((size(dX.payments) != 1)) | |
1380 | - | then throw("exactly 1 payment must be attached") | |
1381 | - | else { | |
1382 | - | let dk = dX.payments[0] | |
1383 | - | let dl = dk.amount | |
1384 | - | let eC = valueOrErrorMessage(dk.assetId, "WAVES can't be used as payment") | |
1385 | - | if ((eC != ae)) | |
1386 | - | then throw("USDT payments only!") | |
1387 | - | else if ((dl != eZ)) | |
1388 | - | then throw(("Payment needed is " + toString(eZ))) | |
1389 | - | else [StringEntry(be, eQ)] | |
1390 | - | } | |
1391 | - | else if ((eZ == 0)) | |
1392 | - | then if ((size(dX.payments) != 0)) | |
1393 | - | then throw("No payments needed") | |
1394 | - | else [StringEntry(be, eQ)] | |
1395 | - | else if ((size(dX.payments) != 0)) | |
1396 | - | then throw("No payments needed") | |
1397 | - | else [ScriptTransfer(addressFromStringValue(ep), -(eZ), ae), StringEntry(be, eQ)] | |
1398 | - | $Tuple2(fa, $Tuple2(eP, dJ)) | |
1399 | - | } | |
1400 | - | } | |
1401 | - | } | |
1402 | - | } | |
1403 | - | ||
1404 | - | ||
1405 | - | ||
1406 | - | @Callable(dX) | |
1407 | - | func acceptWarehouseOrder (dq,dp,T) = { | |
1408 | - | let ea = bF() | |
1409 | - | if ((ea == ea)) | |
1410 | - | then { | |
1411 | - | let de = dX.originCaller | |
1412 | - | let cZ = toString(de) | |
1413 | - | let fb = valueOrErrorMessage(getString(aC, Q(cZ)), "You don't have a duck staked") | |
1414 | - | let eb = valueOrElse(getString(aC, U(fb)), g) | |
1415 | - | let fc = split(value(eb), "_") | |
1416 | - | if ((fc[J] != "L")) | |
1417 | - | then throw((("Duck location type is " + fc[J]) + ", but should be L")) | |
1418 | - | else if ((fb != T)) | |
1419 | - | then throw(((("Your staked duck is " + fb) + ", but passed ") + T)) | |
1420 | - | else { | |
1421 | - | let bD = S(T) | |
1422 | - | let ec = bC(bD) | |
1423 | - | let dr = split(ec[F], "_") | |
1424 | - | let ds = split(ec[G], "_") | |
1425 | - | let dt = if ((ec[H] == "")) | |
1426 | - | then nil | |
1427 | - | else split_4C(ec[H], "_") | |
1428 | - | let fd = do(dp, cZ, dq, dr, ds, dt) | |
1429 | - | let fe = fd._1 | |
1430 | - | let ff = fd._2 | |
1431 | - | let fg = fd._3 | |
1432 | - | let fh = fd._4 | |
1433 | - | let cY = fd._5 | |
1434 | - | let dg = fd._6 | |
1435 | - | let fi = fd._7 | |
1436 | - | let di = fd._8 | |
1437 | - | let fj = fd._9 | |
1438 | - | let dK = fd._10 | |
1439 | - | let fk = [fe, cX(cY, cZ, 0)] | |
1440 | - | let fl = df(dg, dX.payments, di, 0) | |
1441 | - | let fm = makeString_2C([ec[E], makeString(ff, "_"), makeString(fg, "_"), makeString_2C(fh, "_")], ":") | |
1442 | - | let fn = aF(invoke(aC, "updateBackpack", [T, fm], nil)) | |
1443 | - | let fo = aI(invoke(aC, "updateDuckStats", [T, fraction(d, fi, ak)], nil)) | |
1444 | - | $Tuple2((fk ++ fl), $Tuple5(ea, fj, fn, fo, dK)) | |
1445 | - | } | |
1446 | - | } | |
1447 | - | else throw("Strict value is not equal to itself.") | |
1448 | - | } | |
1449 | - | ||
1450 | - | ||
1451 | - | ||
1452 | - | @Callable(dX) | |
1453 | - | func acceptShopOrderDuckDelivery (fp,dp) = if (!(ac)) | |
1342 | + | @Callable(eo) | |
1343 | + | func craftGoodsDuckDelivery (ec,ed,eb) = if (!(ae)) | |
1454 | 1344 | then throw("Delivery feature is turned off!") | |
1455 | 1345 | else { | |
1456 | - | let | |
1457 | - | if (( | |
1346 | + | let er = bH() | |
1347 | + | if ((er == er)) | |
1458 | 1348 | then { | |
1459 | - | let de = dX.originCaller | |
1460 | - | let cZ = toString(de) | |
1461 | - | let T = valueOrErrorMessage(getString(aC, Q(cZ)), "You don't have a duck staked") | |
1462 | - | let bD = S(T) | |
1463 | - | let ec = bC(bD) | |
1464 | - | let dr = split(ec[F], "_") | |
1465 | - | let ds = split(ec[G], "_") | |
1466 | - | let dt = if ((ec[H] == "")) | |
1467 | - | then nil | |
1468 | - | else split_4C(ec[H], "_") | |
1469 | - | let fq = do(dp, cZ, fp, dr, ds, dt) | |
1470 | - | let fe = fq._1 | |
1471 | - | let ff = fq._2 | |
1472 | - | let fg = fq._3 | |
1473 | - | let fh = fq._4 | |
1474 | - | let cY = fq._5 | |
1475 | - | let dg = fq._6 | |
1476 | - | let fi = fq._7 | |
1477 | - | let di = fq._8 | |
1478 | - | let fj = fq._9 | |
1479 | - | let dK = fq._10 | |
1480 | - | let fr = fraction((dg + cY), aV, aj) | |
1481 | - | let fs = if ((k > fr)) | |
1482 | - | then k | |
1483 | - | else fr | |
1484 | - | let dj = fraction(fs, dg, (dg + cY)) | |
1485 | - | let da = (fs - dj) | |
1486 | - | let em = valueOrElse(getInteger(Y), 0) | |
1487 | - | let fk = [fe, cX(cY, cZ, da)] | |
1488 | - | let fl = df(dg, dX.payments, di, dj) | |
1489 | - | let fm = makeString_2C([ec[E], makeString(ff, "_"), makeString(fg, "_"), makeString_2C(fh, "_")], ":") | |
1490 | - | let fn = aF(invoke(aC, "updateBackpack", [T, fm], nil)) | |
1491 | - | let fo = aI(invoke(aC, "updateDuckStats", [T, fraction(d, fi, ak)], nil)) | |
1492 | - | $Tuple2(((fk ++ fl) :+ IntegerEntry(Y, (em + fs))), $Tuple5(ea, fj, fn, fo, dK)) | |
1493 | - | } | |
1494 | - | else throw("Strict value is not equal to itself.") | |
1495 | - | } | |
1496 | - | ||
1497 | - | ||
1498 | - | ||
1499 | - | @Callable(dX) | |
1500 | - | func acceptShopOrderLandDelivery (fp,dp,ft) = if (!(ac)) | |
1501 | - | then throw("Delivery feature is turned off!") | |
1502 | - | else { | |
1503 | - | let ea = bF() | |
1504 | - | if ((ea == ea)) | |
1505 | - | then { | |
1506 | - | let de = dX.originCaller | |
1507 | - | let cZ = toString(de) | |
1508 | - | let eo = value(assetInfo(fromBase58String(ft))) | |
1509 | - | if (!(isDefined(getInteger(aC, N(ft))))) | |
1510 | - | then throw((("NFT " + eo.name) + " is not staked")) | |
1349 | + | let V = valueOrErrorMessage(getString(aE, S(toString(eo.caller))), "You don't have a duck staked") | |
1350 | + | if ((size(eo.payments) != 1)) | |
1351 | + | then throw("exactly 1 payment must be attached") | |
1511 | 1352 | else { | |
1512 | - | let ep = valueOrErrorMessage(getString(aC, L(ft)), (("NFT " + eo.name) + " is orphaned")) | |
1513 | - | if ((ep != cZ)) | |
1514 | - | then throw((e + " is not yours")) | |
1353 | + | let dm = eo.payments[0] | |
1354 | + | let dn = dm.amount | |
1355 | + | if (if (!(isDefined(dm.assetId))) | |
1356 | + | then true | |
1357 | + | else (value(dm.assetId) != ag)) | |
1358 | + | then throw("USDT payments only!") | |
1515 | 1359 | else { | |
1516 | - | let dz = aF(invoke(aC, "getWarehouseREADONLY", [ft], nil)) | |
1517 | - | let bY = split_4C(dz, ":") | |
1518 | - | let cK = split(bY[y], "_") | |
1519 | - | let cR = split(bY[z], "_") | |
1520 | - | let eF = if ((bY[A] == "")) | |
1360 | + | let et = bE(U(V)) | |
1361 | + | let cT = split(et[I], "_") | |
1362 | + | let ea = if ((et[J] == "")) | |
1521 | 1363 | then nil | |
1522 | - | else split(bY[A], "_") | |
1523 | - | let fu = do(dp, cZ, fp, cK, cR, eF) | |
1524 | - | let fe = fu._1 | |
1525 | - | let ff = fu._2 | |
1526 | - | let fg = fu._3 | |
1527 | - | let fh = fu._4 | |
1528 | - | let cY = fu._5 | |
1529 | - | let dg = fu._6 | |
1530 | - | let fi = fu._7 | |
1531 | - | let di = fu._8 | |
1532 | - | let fj = fu._9 | |
1533 | - | let dK = fu._10 | |
1534 | - | let fr = fraction((dg + cY), aV, aj) | |
1535 | - | let fs = if ((k > fr)) | |
1536 | - | then k | |
1537 | - | else fr | |
1538 | - | let dj = fraction(fs, dg, (dg + cY)) | |
1539 | - | let da = (fs - dj) | |
1540 | - | let em = valueOrElse(getInteger(Y), 0) | |
1541 | - | let fk = [fe, cX(cY, cZ, da)] | |
1542 | - | let fl = df(dg, dX.payments, di, dj) | |
1543 | - | let dH = makeString_2C([bY[x], makeString(ff, "_"), makeString(fg, "_"), makeString(fh, "_"), bY[B]], ":") | |
1544 | - | let dJ = aF(invoke(aC, "saveWarehouse", [dH, ft], nil)) | |
1545 | - | let eh = aI(invoke(aC, "updateAccStats", [cZ, fraction(d, fi, ak)], nil)) | |
1546 | - | $Tuple2(((fk ++ fl) :+ IntegerEntry(Y, (em + fs))), $Tuple5(ea, fj, dJ, eh, dK)) | |
1364 | + | else split_4C(et[J], "_") | |
1365 | + | let eV = dZ(cT, ea, eb, ec, ed) | |
1366 | + | let eJ = eV._1 | |
1367 | + | let ej = eV._2 | |
1368 | + | let eT = eV._3 | |
1369 | + | let ew = makeString([et[G], et[H], makeString(eJ, "_"), makeString_2C(ej, "_")], ":") | |
1370 | + | let ex = aH(invoke(aE, "updateBackpack", [V, ew], nil)) | |
1371 | + | let ey = aK(invoke(aE, "updateDuckStats", [V, fraction(b, eT, am)], nil)) | |
1372 | + | let eC = fraction(ed, k, n) | |
1373 | + | let dW = max([eC, k]) | |
1374 | + | let do = (m + dW) | |
1375 | + | if ((do > dn)) | |
1376 | + | then throw((((((("Insufficient payment! Attached=" + aN(dn, 6)) + ", required=") + aN(m, 6)) + "+") + aN(dW, 6)) + "(delivery fee)")) | |
1377 | + | else { | |
1378 | + | let az = if (((dn - do) > 0)) | |
1379 | + | then [ScriptTransfer(eo.caller, (dn - do), ag)] | |
1380 | + | else nil | |
1381 | + | let eD = valueOrElse(getInteger(aa), 0) | |
1382 | + | $Tuple2((az :+ IntegerEntry(aa, (eD + dW))), $Tuple3(ex, er, ey)) | |
1383 | + | } | |
1547 | 1384 | } | |
1548 | 1385 | } | |
1549 | 1386 | } | |
1552 | 1389 | ||
1553 | 1390 | ||
1554 | 1391 | ||
1555 | - | @Callable(dX) | |
1556 | - | func sellProductsToES (cM) = { | |
1557 | - | let ea = bF() | |
1558 | - | if ((ea == ea)) | |
1559 | - | then if ((size(dX.payments) != 0)) | |
1392 | + | @Callable(eo) | |
1393 | + | func craftGoodsLandDelivery (ec,ed,Y,eb) = if (!(ae)) | |
1394 | + | then throw("Delivery feature is turned off!") | |
1395 | + | else { | |
1396 | + | let er = bH() | |
1397 | + | if ((er == er)) | |
1398 | + | then if ((size(eo.payments) != 1)) | |
1399 | + | then throw("exactly 1 payment must be attached") | |
1400 | + | else { | |
1401 | + | let dm = eo.payments[0] | |
1402 | + | let dn = dm.amount | |
1403 | + | if (if (!(isDefined(dm.assetId))) | |
1404 | + | then true | |
1405 | + | else (value(dm.assetId) != ag)) | |
1406 | + | then throw("USDT payments only!") | |
1407 | + | else { | |
1408 | + | let eE = eo.caller | |
1409 | + | let R = toString(eE) | |
1410 | + | let eF = value(assetInfo(fromBase58String(Y))) | |
1411 | + | if (!(isDefined(getInteger(aE, P(Y))))) | |
1412 | + | then throw((("NFT " + eF.name) + " is not staked")) | |
1413 | + | else { | |
1414 | + | let eG = valueOrErrorMessage(getString(aE, N(Y)), (("NFT " + eF.name) + " is orphaned")) | |
1415 | + | if ((eG != R)) | |
1416 | + | then throw((e + " is not yours")) | |
1417 | + | else { | |
1418 | + | let dB = aH(invoke(aE, "getWarehouseREADONLY", [Y], nil)) | |
1419 | + | let ca = split_4C(dB, ":") | |
1420 | + | let cT = split(ca[B], "_") | |
1421 | + | let ea = if ((ca[C] == "")) | |
1422 | + | then nil | |
1423 | + | else split_4C(ca[C], "_") | |
1424 | + | let eW = dZ(cT, ea, eb, ec, ed) | |
1425 | + | let eJ = eW._1 | |
1426 | + | let ej = eW._2 | |
1427 | + | let eT = eW._3 | |
1428 | + | let dJ = makeString_2C([ca[z], ca[A], makeString(eJ, "_"), makeString_2C(ej, "_"), ca[D]], ":") | |
1429 | + | let dL = aH(invoke(aE, "saveWarehouse", [dJ, Y], nil)) | |
1430 | + | let ey = aK(invoke(aE, "updateAccStats", [R, fraction(b, eT, am)], nil)) | |
1431 | + | let eC = fraction(ed, k, n) | |
1432 | + | let dW = max([eC, k]) | |
1433 | + | let do = (m + dW) | |
1434 | + | if ((do > dn)) | |
1435 | + | then throw((((((("Insufficient payment! Attached=" + aN(dn, 6)) + ", required=") + aN(m, 6)) + "+") + aN(dW, 6)) + "(delivery fee)")) | |
1436 | + | else { | |
1437 | + | let az = if (((dn - do) > 0)) | |
1438 | + | then [ScriptTransfer(eo.caller, (dn - do), ag)] | |
1439 | + | else nil | |
1440 | + | let eD = valueOrElse(getInteger(aa), 0) | |
1441 | + | $Tuple2((az :+ IntegerEntry(aa, (eD + dW))), $Tuple3(dL, er, ey)) | |
1442 | + | } | |
1443 | + | } | |
1444 | + | } | |
1445 | + | } | |
1446 | + | } | |
1447 | + | else throw("Strict value is not equal to itself.") | |
1448 | + | } | |
1449 | + | ||
1450 | + | ||
1451 | + | ||
1452 | + | @Callable(eo) | |
1453 | + | func setWarehouseOrder (eX,Y) = { | |
1454 | + | let eE = eo.originCaller | |
1455 | + | let R = toString(eE) | |
1456 | + | let eU = if ((eE != aD)) | |
1457 | + | then bG() | |
1458 | + | else false | |
1459 | + | let eF = value(assetInfo(fromBase58String(Y))) | |
1460 | + | if (!(isDefined(getInteger(aE, P(Y))))) | |
1461 | + | then throw((("NFT " + eF.name) + " is not staked")) | |
1462 | + | else { | |
1463 | + | let eG = valueOrErrorMessage(getString(aE, N(Y)), (("NFT " + eF.name) + " is orphaned")) | |
1464 | + | if (if ((eE != aD)) | |
1465 | + | then (eG != R) | |
1466 | + | else false) | |
1467 | + | then throw((e + " is not yours")) | |
1468 | + | else { | |
1469 | + | let eY = split_4C(eX, ":") | |
1470 | + | let dB = aH(invoke(aE, "getWarehouseREADONLY", [Y], nil)) | |
1471 | + | let ca = split_4C(dB, ":") | |
1472 | + | let eZ = split(ca[D], "_") | |
1473 | + | let fa = parseIntValue(eZ[F]) | |
1474 | + | let bg = X(Y) | |
1475 | + | let cb = bf(bg) | |
1476 | + | let ep = bZ(ca, cb, eY) | |
1477 | + | let fb = ep._4 | |
1478 | + | let fc = ep._5 | |
1479 | + | let fd = ep._7 | |
1480 | + | let fe = (fb + fc) | |
1481 | + | let ff = ((fa - fd) - fe) | |
1482 | + | if ((0 > ff)) | |
1483 | + | then throw((((((("Attempt to reserve " + toString(fb)) + " space for buy orders, and ") + toString(fc)) + " space for sell orders (and occupied=") + toString(fd)) + "), leads to negative free space")) | |
1484 | + | else { | |
1485 | + | let dJ = makeString_2C([ca[z], makeString(ep._1, "_"), makeString(ep._2, "_"), makeString_2C(ep._3, "_"), toString(fe)], ":") | |
1486 | + | let dL = aH(invoke(aE, "saveWarehouse", [dJ, Y], nil)) | |
1487 | + | let fg = ep._6 | |
1488 | + | let fh = if ((fg > 0)) | |
1489 | + | then if ((size(eo.payments) != 1)) | |
1490 | + | then throw("exactly 1 payment must be attached") | |
1491 | + | else { | |
1492 | + | let dm = eo.payments[0] | |
1493 | + | let dn = dm.amount | |
1494 | + | let fi = valueOrErrorMessage(dm.assetId, "WAVES can't be used as payment") | |
1495 | + | if ((fi != ag)) | |
1496 | + | then throw("USDT payments only!") | |
1497 | + | else if ((dn != fg)) | |
1498 | + | then throw(("Payment needed is " + toString(fg))) | |
1499 | + | else [StringEntry(bg, eX)] | |
1500 | + | } | |
1501 | + | else if ((fg == 0)) | |
1502 | + | then if ((size(eo.payments) != 0)) | |
1503 | + | then throw("No payments needed") | |
1504 | + | else [StringEntry(bg, eX)] | |
1505 | + | else if ((size(eo.payments) != 0)) | |
1506 | + | then throw("No payments needed") | |
1507 | + | else [ScriptTransfer(addressFromStringValue(eG), -(fg), ag), StringEntry(bg, eX)] | |
1508 | + | $Tuple2(fh, $Tuple2(eU, dL)) | |
1509 | + | } | |
1510 | + | } | |
1511 | + | } | |
1512 | + | } | |
1513 | + | ||
1514 | + | ||
1515 | + | ||
1516 | + | @Callable(eo) | |
1517 | + | func acceptWarehouseOrder (ds,dr,V) = { | |
1518 | + | let er = bH() | |
1519 | + | if ((er == er)) | |
1520 | + | then { | |
1521 | + | let dg = eo.originCaller | |
1522 | + | let db = toString(dg) | |
1523 | + | let fj = valueOrErrorMessage(getString(aE, S(db)), "You don't have a duck staked") | |
1524 | + | let es = valueOrElse(getString(aE, W(fj)), g) | |
1525 | + | let fk = split(value(es), "_") | |
1526 | + | if ((fk[L] != "L")) | |
1527 | + | then throw((("Duck location type is " + fk[L]) + ", but should be L")) | |
1528 | + | else if ((fj != V)) | |
1529 | + | then throw(((("Your staked duck is " + fj) + ", but passed ") + V)) | |
1530 | + | else { | |
1531 | + | let bF = U(V) | |
1532 | + | let et = bE(bF) | |
1533 | + | let dt = split(et[H], "_") | |
1534 | + | let du = split(et[I], "_") | |
1535 | + | let dv = if ((et[J] == "")) | |
1536 | + | then nil | |
1537 | + | else split_4C(et[J], "_") | |
1538 | + | let fl = dq(dr, db, ds, dt, du, dv) | |
1539 | + | let fm = fl._1 | |
1540 | + | let fn = fl._2 | |
1541 | + | let fo = fl._3 | |
1542 | + | let fp = fl._4 | |
1543 | + | let da = fl._5 | |
1544 | + | let di = fl._6 | |
1545 | + | let fq = fl._7 | |
1546 | + | let dk = fl._8 | |
1547 | + | let fr = fl._9 | |
1548 | + | let dM = fl._10 | |
1549 | + | let fs = [fm, cZ(da, db, 0)] | |
1550 | + | let ft = dh(di, eo.payments, dk, 0) | |
1551 | + | let fu = makeString_2C([et[G], makeString(fn, "_"), makeString(fo, "_"), makeString_2C(fp, "_")], ":") | |
1552 | + | let fv = aH(invoke(aE, "updateBackpack", [V, fu], nil)) | |
1553 | + | let fw = aK(invoke(aE, "updateDuckStats", [V, fraction(d, fq, am)], nil)) | |
1554 | + | $Tuple2((fs ++ ft), $Tuple5(er, fr, fv, fw, dM)) | |
1555 | + | } | |
1556 | + | } | |
1557 | + | else throw("Strict value is not equal to itself.") | |
1558 | + | } | |
1559 | + | ||
1560 | + | ||
1561 | + | ||
1562 | + | @Callable(eo) | |
1563 | + | func acceptShopOrderDuckDelivery (fx,dr) = if (!(ae)) | |
1564 | + | then throw("Delivery feature is turned off!") | |
1565 | + | else { | |
1566 | + | let er = bH() | |
1567 | + | if ((er == er)) | |
1568 | + | then { | |
1569 | + | let dg = eo.originCaller | |
1570 | + | let db = toString(dg) | |
1571 | + | let V = valueOrErrorMessage(getString(aE, S(db)), "You don't have a duck staked") | |
1572 | + | let bF = U(V) | |
1573 | + | let et = bE(bF) | |
1574 | + | let dt = split(et[H], "_") | |
1575 | + | let du = split(et[I], "_") | |
1576 | + | let dv = if ((et[J] == "")) | |
1577 | + | then nil | |
1578 | + | else split_4C(et[J], "_") | |
1579 | + | let fy = dq(dr, db, fx, dt, du, dv) | |
1580 | + | let fm = fy._1 | |
1581 | + | let fn = fy._2 | |
1582 | + | let fo = fy._3 | |
1583 | + | let fp = fy._4 | |
1584 | + | let da = fy._5 | |
1585 | + | let di = fy._6 | |
1586 | + | let fq = fy._7 | |
1587 | + | let dk = fy._8 | |
1588 | + | let fr = fy._9 | |
1589 | + | let dM = fy._10 | |
1590 | + | let fz = fraction((di + da), aX, al) | |
1591 | + | let fA = max([fz, k]) | |
1592 | + | let dl = fraction(fA, di, (di + da)) | |
1593 | + | let dc = (fA - dl) | |
1594 | + | let eD = valueOrElse(getInteger(aa), 0) | |
1595 | + | let fs = [fm, cZ(da, db, dc)] | |
1596 | + | let ft = dh(di, eo.payments, dk, dl) | |
1597 | + | let fu = makeString_2C([et[G], makeString(fn, "_"), makeString(fo, "_"), makeString_2C(fp, "_")], ":") | |
1598 | + | let fv = aH(invoke(aE, "updateBackpack", [V, fu], nil)) | |
1599 | + | let fw = aK(invoke(aE, "updateDuckStats", [V, fraction(d, fq, am)], nil)) | |
1600 | + | $Tuple2(((fs ++ ft) :+ IntegerEntry(aa, (eD + fA))), $Tuple5(er, fr, fv, fw, dM)) | |
1601 | + | } | |
1602 | + | else throw("Strict value is not equal to itself.") | |
1603 | + | } | |
1604 | + | ||
1605 | + | ||
1606 | + | ||
1607 | + | @Callable(eo) | |
1608 | + | func acceptShopOrderLandDelivery (fx,dr,fB) = if (!(ae)) | |
1609 | + | then throw("Delivery feature is turned off!") | |
1610 | + | else { | |
1611 | + | let er = bH() | |
1612 | + | if ((er == er)) | |
1613 | + | then { | |
1614 | + | let dg = eo.originCaller | |
1615 | + | let db = toString(dg) | |
1616 | + | let eF = value(assetInfo(fromBase58String(fB))) | |
1617 | + | if (!(isDefined(getInteger(aE, P(fB))))) | |
1618 | + | then throw((("NFT " + eF.name) + " is not staked")) | |
1619 | + | else { | |
1620 | + | let eG = valueOrErrorMessage(getString(aE, N(fB)), (("NFT " + eF.name) + " is orphaned")) | |
1621 | + | if ((eG != db)) | |
1622 | + | then throw((e + " is not yours")) | |
1623 | + | else { | |
1624 | + | let dB = aH(invoke(aE, "getWarehouseREADONLY", [fB], nil)) | |
1625 | + | let ca = split_4C(dB, ":") | |
1626 | + | let cM = split(ca[A], "_") | |
1627 | + | let cT = split(ca[B], "_") | |
1628 | + | let ea = if ((ca[C] == "")) | |
1629 | + | then nil | |
1630 | + | else split_4C(ca[C], "_") | |
1631 | + | let fC = dq(dr, db, fx, cM, cT, ea) | |
1632 | + | let fm = fC._1 | |
1633 | + | let fn = fC._2 | |
1634 | + | let fo = fC._3 | |
1635 | + | let fp = fC._4 | |
1636 | + | let da = fC._5 | |
1637 | + | let di = fC._6 | |
1638 | + | let fq = fC._7 | |
1639 | + | let dk = fC._8 | |
1640 | + | let fr = fC._9 | |
1641 | + | let dM = fC._10 | |
1642 | + | let fz = fraction((di + da), aX, al) | |
1643 | + | let fA = max([fz, k]) | |
1644 | + | let dl = fraction(fA, di, (di + da)) | |
1645 | + | let dc = (fA - dl) | |
1646 | + | let eD = valueOrElse(getInteger(aa), 0) | |
1647 | + | let fs = [fm, cZ(da, db, dc)] | |
1648 | + | let ft = dh(di, eo.payments, dk, dl) | |
1649 | + | let dJ = makeString_2C([ca[z], makeString(fn, "_"), makeString(fo, "_"), makeString(fp, "_"), ca[D]], ":") | |
1650 | + | let dL = aH(invoke(aE, "saveWarehouse", [dJ, fB], nil)) | |
1651 | + | let ey = aK(invoke(aE, "updateAccStats", [db, fraction(d, fq, am)], nil)) | |
1652 | + | $Tuple2(((fs ++ ft) :+ IntegerEntry(aa, (eD + fA))), $Tuple5(er, fr, dL, ey, dM)) | |
1653 | + | } | |
1654 | + | } | |
1655 | + | } | |
1656 | + | else throw("Strict value is not equal to itself.") | |
1657 | + | } | |
1658 | + | ||
1659 | + | ||
1660 | + | ||
1661 | + | @Callable(eo) | |
1662 | + | func sellProductsToES (cO) = { | |
1663 | + | let er = bH() | |
1664 | + | if ((er == er)) | |
1665 | + | then if ((size(eo.payments) != 0)) | |
1560 | 1666 | then throw("No payments needed") | |
1561 | 1667 | else { | |
1562 | - | let | |
1563 | - | let | |
1564 | - | if (( | |
1565 | - | then throw(("Duck location type should be Airport, but is " + | |
1668 | + | let V = valueOrErrorMessage(getString(aE, S(toString(eo.caller))), "You don't have a duck staked") | |
1669 | + | let es = split(valueOrElse(getString(aE, W(V)), g), "_") | |
1670 | + | if ((es[L] != "A")) | |
1671 | + | then throw(("Duck location type should be Airport, but is " + es[L])) | |
1566 | 1672 | else { | |
1567 | - | let | |
1568 | - | let | |
1673 | + | let et = bE(U(V)) | |
1674 | + | let ea = if ((et[J] == "")) | |
1569 | 1675 | then nil | |
1570 | - | else split_4C( | |
1571 | - | let | |
1572 | - | let | |
1573 | - | let | |
1574 | - | then split_4C(value( | |
1676 | + | else split_4C(et[J], "_") | |
1677 | + | let fD = Z() | |
1678 | + | let fE = getString(fD) | |
1679 | + | let fF = if (isDefined(fE)) | |
1680 | + | then split_4C(value(fE), "_") | |
1575 | 1681 | else nil | |
1576 | - | func | |
1577 | - | let | |
1578 | - | let | |
1579 | - | then | |
1682 | + | func fG (bJ,fH) = { | |
1683 | + | let bL = bJ._1 | |
1684 | + | let ed = if ((size(cO) > bL)) | |
1685 | + | then cO[bL] | |
1580 | 1686 | else 0 | |
1581 | - | if ((0 > | |
1687 | + | if ((0 > ed)) | |
1582 | 1688 | then throw("Quantity cannot be negative") | |
1583 | 1689 | else { | |
1584 | - | let | |
1585 | - | if ((size( | |
1586 | - | then throw(("Fatal: unknown recipe: " + | |
1690 | + | let ad = split(fH, "_") | |
1691 | + | if ((size(ad) != x)) | |
1692 | + | then throw(("Fatal: unknown recipe: " + fH)) | |
1587 | 1693 | else { | |
1588 | - | let | |
1589 | - | let | |
1590 | - | then parseIntValue( | |
1694 | + | let fI = (i * y) | |
1695 | + | let fJ = if ((size(fF) > bL)) | |
1696 | + | then parseIntValue(fF[bL]) | |
1591 | 1697 | else 0 | |
1592 | - | let | |
1593 | - | if (( | |
1594 | - | then throw(((("Warehouse can buy only " + toString( | |
1698 | + | let fK = (fI - fJ) | |
1699 | + | if ((ed > fK)) | |
1700 | + | then throw(((("Warehouse can buy only " + toString(fK)) + " of ") + r[bL])) | |
1595 | 1701 | else { | |
1596 | - | let | |
1597 | - | let | |
1598 | - | let | |
1599 | - | then parseIntValue( | |
1702 | + | let eK = ac(ad) | |
1703 | + | let fL = fraction((eK * j), h, (am * y)) | |
1704 | + | let fM = if ((size(ea) > bL)) | |
1705 | + | then parseIntValue(ea[bL]) | |
1600 | 1706 | else 0 | |
1601 | - | if (( | |
1602 | - | then throw(((("You have only " + toString( | |
1603 | - | else $Tuple5(( | |
1707 | + | if ((ed > fM)) | |
1708 | + | then throw(((("You have only " + toString(fM)) + " of ") + r[bL])) | |
1709 | + | else $Tuple5((bL + 1), (bJ._2 + (fL * ed)), (bJ._3 :+ toString((fM - ed))), (bJ._4 :+ toString((fJ + ed))), (bJ._5 + (eK * ed))) | |
1604 | 1710 | } | |
1605 | 1711 | } | |
1606 | 1712 | } | |
1607 | 1713 | } | |
1608 | 1714 | ||
1609 | - | let | |
1610 | - | let | |
1611 | - | let | |
1612 | - | let | |
1613 | - | func | |
1614 | - | then | |
1615 | - | else | |
1715 | + | let en = { | |
1716 | + | let cn = u | |
1717 | + | let co = size(cn) | |
1718 | + | let cp = $Tuple5(0, 0, nil, nil, 0) | |
1719 | + | func cq (cr,cs) = if ((cs >= co)) | |
1720 | + | then cr | |
1721 | + | else fG(cr, cn[cs]) | |
1616 | 1722 | ||
1617 | - | func | |
1618 | - | then | |
1723 | + | func ct (cr,cs) = if ((cs >= co)) | |
1724 | + | then cr | |
1619 | 1725 | else throw("List size exceeds 50") | |
1620 | 1726 | ||
1621 | - | | |
1727 | + | ct(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cp, 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) | |
1622 | 1728 | } | |
1623 | - | let | |
1624 | - | let | |
1625 | - | let | |
1626 | - | $Tuple2([StringEntry( | |
1729 | + | let fu = makeString_2C([et[G], et[H], et[I], makeString_2C(en._3, "_")], ":") | |
1730 | + | let fv = aH(invoke(aE, "updateBackpack", [V, fu], nil)) | |
1731 | + | let ey = aK(invoke(aE, "updateDuckStats", [V, fraction(c, en._5, (am * 10))], nil)) | |
1732 | + | $Tuple2([StringEntry(fD, makeString_2C(en._4, "_")), ScriptTransfer(eo.caller, en._2, ag)], $Tuple3(fv, er, ey)) | |
1627 | 1733 | } | |
1628 | 1734 | } | |
1629 | 1735 | else throw("Strict value is not equal to itself.") | |
1631 | 1737 | ||
1632 | 1738 | ||
1633 | 1739 | ||
1634 | - | @Callable( | |
1635 | - | func updateEsStorage ( | |
1740 | + | @Callable(eo) | |
1741 | + | func updateEsStorage (fN) = if ((eo.caller != aE)) | |
1636 | 1742 | then throw("Permission denied") | |
1637 | - | else $Tuple2([StringEntry( | |
1743 | + | else $Tuple2([StringEntry(Z(), fN)], fN) | |
1638 | 1744 | ||
1639 | 1745 | ||
1640 | 1746 | ||
1641 | - | @Callable( | |
1642 | - | func updateDeliveryLocked ( | |
1747 | + | @Callable(eo) | |
1748 | + | func updateDeliveryLocked (fO) = if ((eo.caller != aE)) | |
1643 | 1749 | then throw("Permission denied") | |
1644 | - | else $Tuple2([IntegerEntry( | |
1750 | + | else $Tuple2([IntegerEntry(ab, fO)], fO) | |
1645 | 1751 | ||
1646 | 1752 | ||
1647 | 1753 | ||
1648 | - | @Callable( | |
1649 | - | func sendDeliveryReward ( | |
1754 | + | @Callable(eo) | |
1755 | + | func sendDeliveryReward (R) = if ((eo.caller != aE)) | |
1650 | 1756 | then throw("Permission denied") | |
1651 | 1757 | else { | |
1652 | - | let | |
1653 | - | let | |
1654 | - | let | |
1655 | - | let | |
1656 | - | $Tuple2([IntegerEntry( | |
1758 | + | let eD = valueOrElse(getInteger(aa), 0) | |
1759 | + | let fP = valueOrElse(getInteger(ab), 0) | |
1760 | + | let fQ = (k * o) | |
1761 | + | let fR = invoke(aG, "sendAcres", [R, fQ], nil) | |
1762 | + | $Tuple2([IntegerEntry(aa, (eD - k)), IntegerEntry(ab, (fP - k))], fR) | |
1657 | 1763 | } | |
1658 | 1764 | ||
1659 | 1765 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 10000 | |
5 | 5 | ||
6 | 6 | let b = 10000 | |
7 | 7 | ||
8 | 8 | let c = 10000 | |
9 | 9 | ||
10 | 10 | let d = 10000 | |
11 | 11 | ||
12 | 12 | let e = "LAND" | |
13 | 13 | ||
14 | 14 | let f = 6 | |
15 | 15 | ||
16 | 16 | let g = "Africa_F_Africa" | |
17 | 17 | ||
18 | 18 | let h = 39637 | |
19 | 19 | ||
20 | 20 | let i = 10 | |
21 | 21 | ||
22 | 22 | let j = 4 | |
23 | 23 | ||
24 | 24 | let k = 50000 | |
25 | 25 | ||
26 | 26 | let l = 75000 | |
27 | 27 | ||
28 | - | let m = | |
28 | + | let m = 1000000 | |
29 | 29 | ||
30 | - | let n = | |
30 | + | let n = 10 | |
31 | 31 | ||
32 | - | let o = | |
32 | + | let o = 10 | |
33 | 33 | ||
34 | - | let p = [" | |
34 | + | let p = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"] | |
35 | 35 | ||
36 | - | let q = [" | |
36 | + | let q = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
37 | 37 | ||
38 | - | let r = | |
38 | + | let r = ["First Aid Kit L1", "First Aid Kit L2", "First Aid Kit L3", "Backpack L1", "Backpack L2", "Backpack L3", "Food Ration L1", "Food Ration L2", "Food Ration L3", "Jet Pack L1", "Jet Pack L2", "Jet Pack L3", "Shield L1", "Shield L2", "Shield L3", "Mine L1", "Mine L2", "Mine L3", "Trap L1", "Trap L2", "Trap L3"] | |
39 | 39 | ||
40 | - | let s = [" | |
40 | + | let s = ["Americas", "Europe", "Asia", "Africa", "Oceania"] | |
41 | 41 | ||
42 | - | let t = | |
42 | + | let t = 10000000 | |
43 | 43 | ||
44 | - | let u = | |
44 | + | let u = ["8_8_8_17_17_42_12_0_30_0,0,0,0,0,0,0_", "8_8_8_17_17_42_24_0_60_0,0,5,2,0,0,0_", "8_8_8_17_17_42_36_0_120_0,0,10,4,0,0,0_", "8_19_19_8_27_19_26_1_20_0,0,0,0,0,0,0_001", "8_19_19_8_27_19_52_1_40_0,0,0,0,0,0,0_001", "8_19_19_8_27_19_78_1_80_0,0,0,0,0,0,0_001", "8_8_8_8_8_60_13_2_2_0,0,0,0,0,0,0_011", "8_8_8_8_8_60_26_2_4_0,0,0,0,0,0,0_011", "8_8_8_8_8_60_39_2_8_0,0,0,0,0,0,0_011", "30_30_3_17_17_3_30_3_30_0,0,0,0,0,0,0_111", "30_30_3_17_17_3_60_3_50_0,0,0,0,0,0,0_111", "30_30_3_17_17_3_90_3_70_0,0,0,0,0,0,0_111", "18_18_10_18_18_18_11_4_10_0,0,0,0,0,0,0_201", "18_18_10_18_18_18_22_4_20_0,0,0,0,0,0,0_201", "18_18_10_18_18_18_33_4_30_0,0,0,0,0,0,0_201", "4_13_22_4_35_22_23_0_50,1,0_0,0,0,0,0,0,0_", "4_13_22_4_35_22_46_0_50,1,1_0,2,5,0,0,0,0_", "4_13_22_4_35_22_69_0_50,2,1_0,5,10,0,0,0,0_", "5_25_40_5_10_15_20_1_30,1,1_0,0,0,0,0,0,0_", "5_25_40_5_10_15_40_1_30,1,2_2,1,3,0,0,0,0_", "5_25_40_5_10_15_60_1_30,1,3_5,2,8,0,0,0,0_"] | |
45 | 45 | ||
46 | - | let v = | |
46 | + | let v = 6 | |
47 | 47 | ||
48 | - | let w = | |
48 | + | let w = 7 | |
49 | 49 | ||
50 | - | let x = | |
50 | + | let x = 11 | |
51 | 51 | ||
52 | - | let y = | |
52 | + | let y = 10 | |
53 | 53 | ||
54 | - | let z = | |
54 | + | let z = 0 | |
55 | 55 | ||
56 | - | let A = | |
56 | + | let A = 1 | |
57 | 57 | ||
58 | - | let B = | |
58 | + | let B = 2 | |
59 | 59 | ||
60 | - | let C = | |
60 | + | let C = 3 | |
61 | 61 | ||
62 | - | let D = | |
62 | + | let D = 4 | |
63 | 63 | ||
64 | 64 | let E = 0 | |
65 | 65 | ||
66 | - | let F = | |
66 | + | let F = 3 | |
67 | 67 | ||
68 | - | let G = | |
68 | + | let G = 0 | |
69 | 69 | ||
70 | - | let H = | |
70 | + | let H = 1 | |
71 | 71 | ||
72 | - | let I = | |
72 | + | let I = 2 | |
73 | 73 | ||
74 | - | let J = | |
74 | + | let J = 3 | |
75 | 75 | ||
76 | - | let K = | |
76 | + | let K = 0 | |
77 | 77 | ||
78 | - | func L (M) = ("no_" + M) | |
78 | + | let L = 1 | |
79 | + | ||
80 | + | let M = 2 | |
81 | + | ||
82 | + | func N (O) = ("no_" + O) | |
79 | 83 | ||
80 | 84 | ||
81 | - | func | |
85 | + | func P (O) = ("st_" + O) | |
82 | 86 | ||
83 | 87 | ||
84 | - | func | |
88 | + | func Q (R) = ("accRefBy_" + R) | |
85 | 89 | ||
86 | 90 | ||
87 | - | func | |
91 | + | func S (T) = ("stakedDuckByOwner_" + T) | |
88 | 92 | ||
89 | 93 | ||
90 | - | func | |
94 | + | func U (V) = ("backPack_" + V) | |
91 | 95 | ||
92 | 96 | ||
93 | - | func | |
97 | + | func W (V) = ("duckLocation_" + V) | |
94 | 98 | ||
95 | 99 | ||
96 | - | func | |
100 | + | func X (Y) = ("landOrder_" + Y) | |
97 | 101 | ||
98 | 102 | ||
99 | - | func | |
103 | + | func Z () = "emergencyWarehouseProducts" | |
100 | 104 | ||
101 | 105 | ||
102 | - | let | |
106 | + | let aa = "deliveryFund" | |
103 | 107 | ||
104 | - | let | |
108 | + | let ab = "deliveryLocked" | |
105 | 109 | ||
106 | - | func | |
110 | + | func ac (ad) = (parseIntValue(ad[v]) * t) | |
107 | 111 | ||
108 | 112 | ||
109 | - | let | |
113 | + | let ae = true | |
110 | 114 | ||
111 | - | let | |
115 | + | let af = take(drop(this.bytes, 1), 1) | |
112 | 116 | ||
113 | - | let | |
114 | - | let | |
115 | - | if ((base58'2W' == | |
117 | + | let ag = { | |
118 | + | let ah = af | |
119 | + | if ((base58'2W' == ah)) | |
116 | 120 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
117 | - | else if ((base58'2T' == | |
121 | + | else if ((base58'2T' == ah)) | |
118 | 122 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
119 | 123 | else throw("Unknown chain") | |
120 | 124 | } | |
121 | 125 | ||
122 | - | let | |
123 | - | let | |
124 | - | if ((base58'2W' == | |
126 | + | let ai = { | |
127 | + | let ah = af | |
128 | + | if ((base58'2W' == ah)) | |
125 | 129 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
126 | - | else if ((base58'2T' == | |
130 | + | else if ((base58'2T' == ah)) | |
127 | 131 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
128 | 132 | else throw("Unknown chain") | |
129 | 133 | } | |
130 | 134 | ||
131 | - | let | |
135 | + | let aj = "__" | |
132 | 136 | ||
133 | - | let | |
137 | + | let ak = 100000 | |
134 | 138 | ||
135 | - | let | |
139 | + | let al = 1000000 | |
136 | 140 | ||
137 | - | let | |
141 | + | let am = 100000000 | |
138 | 142 | ||
139 | - | let | |
143 | + | let an = 10000000000 | |
140 | 144 | ||
141 | - | let | |
145 | + | let ao = 100000 | |
142 | 146 | ||
143 | - | let | |
147 | + | let ap = [0, 1, 2, 3, 4, 5] | |
144 | 148 | ||
145 | - | func | |
149 | + | func aq (ar,as) = valueOrErrorMessage(getString(ar, as), makeString(["mandatory ", toString(ar), ".", as, " is not defined"], "")) | |
146 | 150 | ||
147 | 151 | ||
148 | - | let | |
152 | + | let at = 1 | |
149 | 153 | ||
150 | - | let | |
154 | + | let au = 6 | |
151 | 155 | ||
152 | - | let | |
156 | + | let av = 8 | |
153 | 157 | ||
154 | - | func | |
158 | + | func aw () = "%s__restConfig" | |
155 | 159 | ||
156 | 160 | ||
157 | - | func | |
161 | + | func ax () = "%s__restAddr" | |
158 | 162 | ||
159 | 163 | ||
160 | - | func | |
164 | + | func ay (az) = split_4C(aq(az, aw()), aj) | |
161 | 165 | ||
162 | 166 | ||
163 | - | func | |
167 | + | func aA (aB,aC) = valueOrErrorMessage(addressFromString(aB[aC]), ("Rest cfg doesn't contain address at index " + toString(aC))) | |
164 | 168 | ||
165 | 169 | ||
166 | - | let | |
170 | + | let aD = addressFromStringValue(valueOrElse(getString(this, ax()), ai)) | |
167 | 171 | ||
168 | - | let | |
172 | + | let aB = ay(aD) | |
169 | 173 | ||
170 | - | let | |
174 | + | let aE = aA(aB, at) | |
171 | 175 | ||
172 | - | let | |
176 | + | let aF = aA(aB, au) | |
173 | 177 | ||
174 | - | let | |
178 | + | let aG = aA(aB, av) | |
175 | 179 | ||
176 | - | func | |
177 | - | let | |
178 | - | if ($isInstanceOf( | |
180 | + | func aH (aI) = { | |
181 | + | let ah = aI | |
182 | + | if ($isInstanceOf(ah, "String")) | |
179 | 183 | then { | |
180 | - | let | |
181 | - | | |
184 | + | let aJ = ah | |
185 | + | aJ | |
182 | 186 | } | |
183 | 187 | else throw("fail to cast into String") | |
184 | 188 | } | |
185 | 189 | ||
186 | 190 | ||
187 | - | func | |
188 | - | let | |
189 | - | if ($isInstanceOf( | |
191 | + | func aK (aI) = { | |
192 | + | let ah = aI | |
193 | + | if ($isInstanceOf(ah, "Int")) | |
190 | 194 | then { | |
191 | - | let | |
192 | - | | |
195 | + | let aL = ah | |
196 | + | aL | |
193 | 197 | } | |
194 | 198 | else throw("fail to cast into Int") | |
195 | 199 | } | |
196 | 200 | ||
197 | 201 | ||
198 | - | func | |
202 | + | func aM () = "contractsBlocked" | |
199 | 203 | ||
200 | 204 | ||
201 | - | func | |
202 | - | let | |
203 | - | let | |
204 | - | let | |
205 | - | (((toString(( | |
205 | + | func aN (aO,aP) = { | |
206 | + | let aQ = pow(10, 0, aP, 0, 0, DOWN) | |
207 | + | let aR = toString((aO % aQ)) | |
208 | + | let aS = drop(toString(aQ), (1 + size(aR))) | |
209 | + | (((toString((aO / aQ)) + ".") + aS) + aR) | |
206 | 210 | } | |
207 | 211 | ||
208 | 212 | ||
209 | - | let | |
213 | + | let aT = 10000000000 | |
210 | 214 | ||
211 | - | let | |
215 | + | let aU = 200 | |
212 | 216 | ||
213 | - | let | |
217 | + | let aV = 300 | |
214 | 218 | ||
215 | - | let | |
219 | + | let aW = 10000 | |
216 | 220 | ||
217 | - | let | |
221 | + | let aX = 10000 | |
218 | 222 | ||
219 | - | let | |
223 | + | let aY = 15000 | |
220 | 224 | ||
221 | - | func | |
225 | + | func aZ (ba,bb) = ((("factoryWhByContinentAndRes_" + ba) + "_") + toString(bb)) | |
222 | 226 | ||
223 | 227 | ||
224 | - | let | |
228 | + | let bc = 0 | |
225 | 229 | ||
226 | - | let | |
230 | + | let bd = 1 | |
227 | 231 | ||
228 | - | let | |
232 | + | let be = 2 | |
229 | 233 | ||
230 | - | func | |
231 | - | let | |
232 | - | [if ((size(split( | |
233 | - | then | |
234 | - | else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split( | |
235 | - | then | |
236 | - | else "0@0_0@0_0@0_0@0_0@0_0@0", | |
234 | + | func bf (bg) = { | |
235 | + | let bh = split(valueOrElse(getString(bg), "0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:"), ":") | |
236 | + | [if ((size(split(bh[bc], "_")) == f)) | |
237 | + | then bh[bc] | |
238 | + | else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split(bh[bd], "_")) == f)) | |
239 | + | then bh[bd] | |
240 | + | else "0@0_0@0_0@0_0@0_0@0_0@0", bh[be]] | |
237 | 241 | } | |
238 | 242 | ||
239 | 243 | ||
240 | - | func | |
244 | + | func bi (bj,bk,bl) = if (bl) | |
241 | 245 | then { | |
242 | - | let | |
243 | - | then ((( | |
244 | - | else -((((-( | |
245 | - | ( | |
246 | + | let bm = if ((bj >= 0)) | |
247 | + | then (((bj + bk) - 1) / bk) | |
248 | + | else -((((-(bj) + bk) - 1) / bk)) | |
249 | + | (bm * am) | |
246 | 250 | } | |
247 | - | else | |
251 | + | else bj | |
248 | 252 | ||
249 | 253 | ||
250 | - | func | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | + | func bn (bo,bb,bj,bp) = { | |
255 | + | let bq = aZ(bo, bb) | |
256 | + | let br = valueOrElse(getInteger(bq), 0) | |
257 | + | let bs = if ((br > aT)) | |
254 | 258 | then 0 | |
255 | - | else if ((( | |
256 | - | then ( | |
257 | - | else | |
258 | - | let | |
259 | - | let | |
260 | - | if ((( | |
261 | - | then throw((((((((((("Actual price = " + toString( | |
262 | - | else $Tuple2(IntegerEntry( | |
259 | + | else if (((br + bj) > aT)) | |
260 | + | then (aT - br) | |
261 | + | else bj | |
262 | + | let bt = (fraction(bs, ((aU * h) - fraction(((100 * br) + (50 * bs)), h, aT)), an) + fraction((bj - bs), h, am)) | |
263 | + | let bu = (bp - (bp / 100)) | |
264 | + | if (((bu * bj) > (bt * am))) | |
265 | + | then throw((((((((((("Actual price = " + toString(bt)) + " / ") + toString(bj)) + " < minPrice = ") + toString(bp)) + ", (") + bo) + ", ") + p[bb]) + ")")) | |
266 | + | else $Tuple2(IntegerEntry(bq, (br + bj)), bt) | |
263 | 267 | } | |
264 | 268 | ||
265 | 269 | ||
266 | - | func | |
267 | - | let | |
268 | - | let | |
269 | - | let | |
270 | - | then min([ | |
270 | + | func bv (bo,bw,bj,bx) = { | |
271 | + | let bq = aZ(bo, bw) | |
272 | + | let br = valueOrElse(getInteger(bq), 0) | |
273 | + | let by = if ((br > aT)) | |
274 | + | then min([bj, (br - aT)]) | |
271 | 275 | else 0 | |
272 | - | let | |
273 | - | let | |
274 | - | let | |
275 | - | let | |
276 | - | let | |
277 | - | if ((( | |
278 | - | then throw((((((((((("Actual price = " + toString( | |
279 | - | else $Tuple3(IntegerEntry( | |
276 | + | let bz = min([br, (bj - by)]) | |
277 | + | let bA = (bz + by) | |
278 | + | let bB = min([br, aT]) | |
279 | + | let bC = (fraction(bz, ((aV * h) - fraction(((100 * bB) - (50 * bz)), h, aT)), an) + fraction(by, (2 * h), am)) | |
280 | + | let bD = (bx + (bx / 100)) | |
281 | + | if (((bC * am) > (bD * bA))) | |
282 | + | then throw((((((((((("Actual price = " + toString(bC)) + " / ") + toString(bA)) + " > maxPrice = ") + toString(bx)) + ", (") + bo) + ", ") + q[bw]) + ")")) | |
283 | + | else $Tuple3(IntegerEntry(bq, (br - bA)), bC, bA) | |
280 | 284 | } | |
281 | 285 | ||
282 | 286 | ||
283 | - | func | |
284 | - | let | |
285 | - | [toString(valueOrElse(parseInt( | |
286 | - | then | |
287 | - | else "0_0_0_0_0_0", if ((size(split( | |
288 | - | then | |
289 | - | else "0_0_0_0_0_0", | |
287 | + | func bE (bF) = { | |
288 | + | let bh = split_4C(valueOrElse(getString(aE, bF), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":") | |
289 | + | [toString(valueOrElse(parseInt(bh[G]), 0)), if ((size(split(bh[H], "_")) == f)) | |
290 | + | then bh[H] | |
291 | + | else "0_0_0_0_0_0", if ((size(split(bh[I], "_")) == f)) | |
292 | + | then bh[I] | |
293 | + | else "0_0_0_0_0_0", bh[J]] | |
290 | 294 | } | |
291 | 295 | ||
292 | 296 | ||
293 | - | func | |
297 | + | func bG () = if (valueOrElse(getBoolean(aE, aM()), false)) | |
294 | 298 | then throw("Contracts are under maintenance") | |
295 | 299 | else unit | |
296 | 300 | ||
297 | 301 | ||
298 | - | func | |
302 | + | func bH () = aK(reentrantInvoke(aE, "saveLastTx", nil, nil)) | |
299 | 303 | ||
300 | 304 | ||
301 | - | func | |
302 | - | let | |
303 | - | let | |
304 | - | then | |
305 | + | func bI (bJ,bK) = { | |
306 | + | let bL = bJ._1 | |
307 | + | let bM = if ((size(bJ._10) > bL)) | |
308 | + | then bJ._10[bL] | |
305 | 309 | else "0@0" | |
306 | - | let | |
307 | - | let | |
308 | - | if ((size( | |
310 | + | let bN = bJ._8 | |
311 | + | let bO = split(bM, "@") | |
312 | + | if ((size(bO) != 2)) | |
309 | 313 | then throw("Incorrect order format, should be amount@price") | |
310 | 314 | else { | |
311 | - | let | |
312 | - | let | |
313 | - | let | |
314 | - | then ( | |
315 | - | else fraction( | |
316 | - | let | |
317 | - | let | |
318 | - | then parseIntValue( | |
315 | + | let bP = parseIntValue(bO[0]) | |
316 | + | let bQ = parseIntValue(bO[1]) | |
317 | + | let bR = if (bN) | |
318 | + | then (bP * bQ) | |
319 | + | else fraction(bP, bQ, am) | |
320 | + | let bS = bi(bP, y, bN) | |
321 | + | let bT = if ((size(bJ._6) > bL)) | |
322 | + | then parseIntValue(bJ._6[bL]) | |
319 | 323 | else 0 | |
320 | - | let | |
321 | - | then | |
324 | + | let bU = split(if ((size(bJ._7) > bL)) | |
325 | + | then bJ._7[bL] | |
322 | 326 | else "0@0", "@") | |
323 | - | let | |
324 | - | let | |
325 | - | if (if ((0 > | |
327 | + | let bV = parseIntValue(bU[0]) | |
328 | + | let bW = parseIntValue(bU[1]) | |
329 | + | if (if ((0 > bW)) | |
326 | 330 | then true | |
327 | - | else (0 > | |
331 | + | else (0 > bQ)) | |
328 | 332 | then throw("Price can't be negative") | |
329 | 333 | else { | |
330 | - | let | |
331 | - | then ( | |
332 | - | else fraction( | |
333 | - | if (( | |
334 | - | then if (( | |
335 | - | then $Tuple10(( | |
336 | - | else $Tuple10(( | |
337 | - | else if (( | |
338 | - | then if ((0 > | |
339 | - | then $Tuple10(( | |
340 | - | else $Tuple10(( | |
341 | - | else if ((0 > | |
334 | + | let bX = if (bN) | |
335 | + | then (bV * bW) | |
336 | + | else fraction(bV, bW, am) | |
337 | + | if ((bP == 0)) | |
338 | + | then if ((bV > 0)) | |
339 | + | then $Tuple10((bL + 1), (bJ._2 :+ toString(bT)), bJ._3, bJ._4, (bJ._5 - bX), bJ._6, bJ._7, bN, (bJ._9 + bi(bT, y, bN)), bJ._10) | |
340 | + | else $Tuple10((bL + 1), (bJ._2 :+ toString((bT - bV))), bJ._3, bJ._4, bJ._5, bJ._6, bJ._7, bN, (bJ._9 + bi((bT - bV), y, bN)), bJ._10) | |
341 | + | else if ((bP > 0)) | |
342 | + | then if ((0 > bV)) | |
343 | + | then $Tuple10((bL + 1), (bJ._2 :+ toString((bT - bV))), (bJ._3 + bS), bJ._4, (bJ._5 + bR), bJ._6, bJ._7, bN, bi((bT - bV), y, bN), bJ._10) | |
344 | + | else $Tuple10((bL + 1), (bJ._2 :+ toString(bT)), (bJ._3 + bS), bJ._4, ((bJ._5 + bR) - bX), bJ._6, bJ._7, bN, bi(bT, y, bN), bJ._10) | |
345 | + | else if ((0 > bV)) | |
342 | 346 | then { | |
343 | - | let | |
344 | - | if ((0 > ( | |
345 | - | then throw((((("Attempt to take " + toString( | |
346 | - | else $Tuple10(( | |
347 | + | let bY = (bV - bP) | |
348 | + | if ((0 > (bT - bY))) | |
349 | + | then throw((((("Attempt to take " + toString(bY)) + " from warehouse, but only ") + toString(bT)) + " available")) | |
350 | + | else $Tuple10((bL + 1), (bJ._2 :+ toString((bT - bY))), bJ._3, (bJ._4 - bS), bJ._5, bJ._6, bJ._7, bN, bi((bT - bY), y, bN), bJ._10) | |
347 | 351 | } | |
348 | - | else if ((0 > ( | |
349 | - | then throw((((("Attempt to take " + toString(-( | |
350 | - | else $Tuple10(( | |
352 | + | else if ((0 > (bT + bP))) | |
353 | + | then throw((((("Attempt to take " + toString(-(bP))) + " from warehouse, but only ") + toString(bT)) + " available")) | |
354 | + | else $Tuple10((bL + 1), (bJ._2 :+ toString((bT + bP))), bJ._3, (bJ._4 - bS), (bJ._5 - bX), bJ._6, bJ._7, bN, bi((bT + bP), y, bN), bJ._10) | |
351 | 355 | } | |
352 | 356 | } | |
353 | 357 | } | |
354 | 358 | ||
355 | 359 | ||
356 | - | func | |
357 | - | let | |
358 | - | let | |
359 | - | let | |
360 | + | func bZ (ca,cb,cc) = { | |
361 | + | let cd = split(ca[A], "_") | |
362 | + | let ce = split(ca[B], "_") | |
363 | + | let cf = if ((ca[C] == "")) | |
360 | 364 | then nil | |
361 | - | else split_4C( | |
362 | - | let | |
363 | - | let | |
364 | - | let | |
365 | + | else split_4C(ca[C], "_") | |
366 | + | let cg = split(cb[bc], "_") | |
367 | + | let ch = split(cb[bd], "_") | |
368 | + | let ci = if ((cb[be] == "")) | |
365 | 369 | then nil | |
366 | - | else split_4C( | |
367 | - | if ((size( | |
370 | + | else split_4C(cb[be], "_") | |
371 | + | if ((size(cc) != 3)) | |
368 | 372 | then throw("newOrderStr should contain exactly 2 ':' separators") | |
369 | 373 | else { | |
370 | - | let | |
371 | - | let | |
372 | - | let | |
374 | + | let cj = split(cc[0], "_") | |
375 | + | let ck = split(cc[1], "_") | |
376 | + | let cl = if ((cc[2] == "")) | |
373 | 377 | then nil | |
374 | - | else split_4C( | |
375 | - | if ((size( | |
378 | + | else split_4C(cc[2], "_") | |
379 | + | if ((size(cj) != f)) | |
376 | 380 | then throw("All 6 resources should be passed") | |
377 | - | else if ((size( | |
381 | + | else if ((size(ck) != f)) | |
378 | 382 | then throw("All 6 materials should be passed") | |
379 | 383 | else { | |
380 | - | let | |
381 | - | let | |
382 | - | let | |
383 | - | let | |
384 | - | func | |
385 | - | then | |
386 | - | else | |
384 | + | let cm = { | |
385 | + | let cn = p | |
386 | + | let co = size(cn) | |
387 | + | let cp = $Tuple10(0, nil, 0, 0, 0, cd, cg, false, 0, cj) | |
388 | + | func cq (cr,cs) = if ((cs >= co)) | |
389 | + | then cr | |
390 | + | else bI(cr, cn[cs]) | |
387 | 391 | ||
388 | - | func | |
389 | - | then | |
392 | + | func ct (cr,cs) = if ((cs >= co)) | |
393 | + | then cr | |
390 | 394 | else throw("List size exceeds 6") | |
391 | 395 | ||
392 | - | | |
396 | + | ct(cq(cq(cq(cq(cq(cq(cp, 0), 1), 2), 3), 4), 5), 6) | |
393 | 397 | } | |
394 | - | let | |
395 | - | let | |
396 | - | let | |
397 | - | let | |
398 | - | func | |
399 | - | then | |
400 | - | else | |
398 | + | let bA = { | |
399 | + | let cn = q | |
400 | + | let co = size(cn) | |
401 | + | let cp = $Tuple10(0, nil, cm._3, cm._4, cm._5, ce, ch, false, cm._9, ck) | |
402 | + | func cu (cr,cs) = if ((cs >= co)) | |
403 | + | then cr | |
404 | + | else bI(cr, cn[cs]) | |
401 | 405 | ||
402 | - | func | |
403 | - | then | |
406 | + | func cv (cr,cs) = if ((cs >= co)) | |
407 | + | then cr | |
404 | 408 | else throw("List size exceeds 6") | |
405 | 409 | ||
406 | - | | |
410 | + | cv(cu(cu(cu(cu(cu(cu(cp, 0), 1), 2), 3), 4), 5), 6) | |
407 | 411 | } | |
408 | - | let | |
409 | - | let | |
410 | - | let | |
411 | - | let | |
412 | - | func | |
413 | - | then | |
414 | - | else | |
412 | + | let bh = { | |
413 | + | let cn = r | |
414 | + | let co = size(cn) | |
415 | + | let cp = $Tuple10(0, nil, bA._3, bA._4, bA._5, cf, ci, true, bA._9, cl) | |
416 | + | func cw (cr,cs) = if ((cs >= co)) | |
417 | + | then cr | |
418 | + | else bI(cr, cn[cs]) | |
415 | 419 | ||
416 | - | func | |
417 | - | then | |
420 | + | func cx (cr,cs) = if ((cs >= co)) | |
421 | + | then cr | |
418 | 422 | else throw("List size exceeds 50") | |
419 | 423 | ||
420 | - | | |
424 | + | cx(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cp, 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) | |
421 | 425 | } | |
422 | - | $Tuple7( | |
426 | + | $Tuple7(cm._2, bA._2, bh._2, bh._3, bh._4, bh._5, bh._9) | |
423 | 427 | } | |
424 | 428 | } | |
425 | 429 | } | |
426 | 430 | ||
427 | 431 | ||
428 | - | func | |
429 | - | let | |
430 | - | let | |
431 | - | let | |
432 | - | if ((size( | |
432 | + | func cy (bJ,cz) = { | |
433 | + | let bL = bJ._7 | |
434 | + | let bN = bJ._12 | |
435 | + | let cA = split(cz, "@") | |
436 | + | if ((size(cA) != 2)) | |
433 | 437 | then throw("Incorrect order format, should be amount@price") | |
434 | 438 | else { | |
435 | - | let | |
436 | - | let | |
437 | - | if ((0 > | |
439 | + | let cB = parseIntValue(cA[0]) | |
440 | + | let cC = parseIntValue(cA[1]) | |
441 | + | if ((0 > cC)) | |
438 | 442 | then throw("Price can't be negative") | |
439 | 443 | else { | |
440 | - | let | |
441 | - | then ( | |
442 | - | else fraction( | |
443 | - | let | |
444 | - | then parseIntValue( | |
444 | + | let cD = if (bN) | |
445 | + | then (cB * cC) | |
446 | + | else fraction(cB, cC, am) | |
447 | + | let cE = if ((size(bJ._8) > bL)) | |
448 | + | then parseIntValue(bJ._8[bL]) | |
445 | 449 | else 0 | |
446 | - | let | |
447 | - | then parseIntValue( | |
450 | + | let bT = if ((size(bJ._9) > bL)) | |
451 | + | then parseIntValue(bJ._9[bL]) | |
448 | 452 | else 0 | |
449 | - | let | |
450 | - | then | |
453 | + | let cF = if ((size(bJ._10) > bL)) | |
454 | + | then bJ._10[bL] | |
451 | 455 | else "0@0" | |
452 | - | let | |
453 | - | let | |
454 | - | let | |
455 | - | if (if (( | |
456 | - | then ( | |
456 | + | let cG = split(cF, "@") | |
457 | + | let cH = parseIntValue(cG[0]) | |
458 | + | let cI = parseIntValue(cG[1]) | |
459 | + | if (if ((cB != 0)) | |
460 | + | then (cC != cI) | |
457 | 461 | else false) | |
458 | - | then throw(((((("Prices of " + | |
462 | + | then throw(((((("Prices of " + bJ._11[bL]) + " don't match! WH price=") + toString(cI)) + ", your price=") + toString(cC))) | |
459 | 463 | else { | |
460 | - | let | |
461 | - | then ( | |
462 | - | else fraction( | |
463 | - | let | |
464 | - | if (( | |
465 | - | then $Tuple13(( | |
466 | - | else if (( | |
467 | - | then if ((0 > | |
468 | - | then if (( | |
469 | - | then throw(((((("Attempt to buy " + toString( | |
470 | - | else $Tuple13(( | |
471 | - | then ( | |
472 | - | else | |
473 | - | else throw((("Attempt to buy " + | |
474 | - | else if (( | |
475 | - | then if ((-( | |
476 | - | then throw(((((("Attempt to sell " + toString(-( | |
477 | - | else if ((-( | |
478 | - | then throw(((((("Attempt to sell " + toString(-( | |
479 | - | else $Tuple13(( | |
480 | - | then ( | |
481 | - | else | |
482 | - | else throw((("Attempt to sell " + | |
464 | + | let cJ = if (bN) | |
465 | + | then (cH * cI) | |
466 | + | else fraction(cH, cI, am) | |
467 | + | let cK = bi(cB, y, bN) | |
468 | + | if ((cB == 0)) | |
469 | + | then $Tuple13((bJ._1 :+ toString(bT)), (bJ._2 :+ cF), (bJ._3 :+ toString(cE)), bJ._4, bJ._5, bJ._6, (bJ._7 + 1), bJ._8, bJ._9, bJ._10, bJ._11, bN, bJ._13) | |
470 | + | else if ((cB > 0)) | |
471 | + | then if ((0 > cH)) | |
472 | + | then if ((cB > -(cH))) | |
473 | + | then throw(((((("Attempt to buy " + toString(cB)) + " of ") + bJ._11[bL]) + ", but warehouse only sells ") + toString(-(cH)))) | |
474 | + | else $Tuple13((bJ._1 :+ toString(bT)), (bJ._2 :+ ((toString((cH + cB)) + "@") + toString(cI))), (bJ._3 :+ toString((cE + cB))), (bJ._4 + cK), bJ._5, (bJ._6 + cD), (bJ._7 + 1), bJ._8, bJ._9, bJ._10, bJ._11, bN, (bJ._13 + (if (bN) | |
475 | + | then (cB * am) | |
476 | + | else cB))) | |
477 | + | else throw((("Attempt to buy " + bJ._11[bL]) + " while warehouse doesn't sell it")) | |
478 | + | else if ((cH > 0)) | |
479 | + | then if ((-(cB) > cH)) | |
480 | + | then throw(((((("Attempt to sell " + toString(-(cB))) + " of ") + bJ._11[bL]) + ", but warehouse only buys ") + toString(cH))) | |
481 | + | else if ((-(cB) > cE)) | |
482 | + | then throw(((((("Attempt to sell " + toString(-(cB))) + ", but you only have ") + toString(cE)) + " of ") + bJ._11[bL])) | |
483 | + | else $Tuple13((bJ._1 :+ toString((bT - cB))), (bJ._2 :+ ((toString((cH + cB)) + "@") + toString(cI))), (bJ._3 :+ toString((cE + cB))), (bJ._4 - cK), (bJ._5 - cD), bJ._6, (bJ._7 + 1), bJ._8, bJ._9, bJ._10, bJ._11, bN, (bJ._13 - (if (bN) | |
484 | + | then (cB * am) | |
485 | + | else cB))) | |
486 | + | else throw((("Attempt to sell " + bJ._11[bL]) + " while warehouse doesn't buy it")) | |
483 | 487 | } | |
484 | 488 | } | |
485 | 489 | } | |
486 | 490 | } | |
487 | 491 | ||
488 | 492 | ||
489 | - | func | |
490 | - | func | |
491 | - | then throw(((((("You have " + | |
492 | - | else if ((0 > | |
493 | - | then throw(((("You tried to sell negative amount of " + | |
494 | - | else if (( | |
493 | + | func cL (cM,cN,cO,cP) = { | |
494 | + | func cQ (bJ,bL) = if ((cO[bL] > parseIntValue(cM[bL]))) | |
495 | + | then throw(((((("You have " + cM[bL]) + " of ") + p[bL]) + ", but tried to sell ") + toString(cO[bL]))) | |
496 | + | else if ((0 > cO[bL])) | |
497 | + | then throw(((("You tried to sell negative amount of " + p[bL]) + ": ") + toString(cO[bL]))) | |
498 | + | else if ((cO[bL] > 0)) | |
495 | 499 | then { | |
496 | - | let | |
497 | - | $Tuple4(( | |
500 | + | let cR = bn(cN, bL, cO[bL], cP[bL]) | |
501 | + | $Tuple4((bJ._1 :+ cR._1), (bJ._2 :+ toString((parseIntValue(cM[bL]) - cO[bL]))), (bJ._3 + cR._2), (bJ._4 + cO[bL])) | |
498 | 502 | } | |
499 | - | else $Tuple4( | |
503 | + | else $Tuple4(bJ._1, (bJ._2 :+ cM[bL]), bJ._3, bJ._4) | |
500 | 504 | ||
501 | - | let | |
502 | - | let | |
503 | - | let | |
504 | - | func | |
505 | - | then | |
506 | - | else | |
505 | + | let cn = ap | |
506 | + | let co = size(cn) | |
507 | + | let cp = $Tuple4(nil, nil, 0, 0) | |
508 | + | func cq (cr,cs) = if ((cs >= co)) | |
509 | + | then cr | |
510 | + | else cQ(cr, cn[cs]) | |
507 | 511 | ||
508 | - | func | |
509 | - | then | |
512 | + | func ct (cr,cs) = if ((cs >= co)) | |
513 | + | then cr | |
510 | 514 | else throw("List size exceeds 6") | |
511 | 515 | ||
512 | - | | |
516 | + | ct(cq(cq(cq(cq(cq(cq(cp, 0), 1), 2), 3), 4), 5), 6) | |
513 | 517 | } | |
514 | 518 | ||
515 | 519 | ||
516 | - | func | |
517 | - | func | |
518 | - | then throw(((("You tried to buy negative amount of " + | |
519 | - | else if (( | |
520 | + | func cS (cT,cN,cO,cU) = { | |
521 | + | func cV (bJ,bL) = if ((0 > cO[bL])) | |
522 | + | then throw(((("You tried to buy negative amount of " + q[bL]) + ": ") + toString(cO[bL]))) | |
523 | + | else if ((cO[bL] > 0)) | |
520 | 524 | then { | |
521 | - | let | |
522 | - | $Tuple4(( | |
525 | + | let cR = bv(cN, bL, cO[bL], cU[bL]) | |
526 | + | $Tuple4((bJ._1 :+ cR._1), (bJ._2 :+ toString((parseIntValue(cT[bL]) + cR._3))), (bJ._3 + cR._2), (bJ._4 + cO[bL])) | |
523 | 527 | } | |
524 | - | else $Tuple4( | |
528 | + | else $Tuple4(bJ._1, (bJ._2 :+ cT[bL]), bJ._3, bJ._4) | |
525 | 529 | ||
526 | - | let | |
527 | - | let | |
528 | - | let | |
529 | - | func | |
530 | - | then | |
531 | - | else | |
530 | + | let cn = ap | |
531 | + | let co = size(cn) | |
532 | + | let cp = $Tuple4(nil, nil, 0, 0) | |
533 | + | func cq (cr,cs) = if ((cs >= co)) | |
534 | + | then cr | |
535 | + | else cV(cr, cn[cs]) | |
532 | 536 | ||
533 | - | func | |
534 | - | then | |
537 | + | func ct (cr,cs) = if ((cs >= co)) | |
538 | + | then cr | |
535 | 539 | else throw("List size exceeds 6") | |
536 | 540 | ||
537 | - | | |
541 | + | ct(cq(cq(cq(cq(cq(cq(cp, 0), 1), 2), 3), 4), 5), 6) | |
538 | 542 | } | |
539 | 543 | ||
540 | 544 | ||
541 | - | func | |
542 | - | func | |
543 | - | let | |
544 | - | if (( | |
545 | - | then throw(((((("You have " + | |
546 | - | else if ((0 > | |
547 | - | then throw(((("You tried to exchange negative amount of " + | |
548 | - | else if (( | |
549 | - | then $Tuple4(( | |
550 | - | else $Tuple4(( | |
545 | + | func cW (cM,cT,cO) = { | |
546 | + | func cX (bJ,bL) = { | |
547 | + | let cY = cO[bL] | |
548 | + | if ((cY > parseIntValue(cM[bL]))) | |
549 | + | then throw(((((("You have " + cM[bL]) + " of ") + p[bL]) + ", but tried to exchange ") + toString(cY))) | |
550 | + | else if ((0 > cY)) | |
551 | + | then throw(((("You tried to exchange negative amount of " + p[bL]) + ": ") + toString(cY))) | |
552 | + | else if ((cY > 0)) | |
553 | + | then $Tuple4((bJ._1 :+ toString((parseIntValue(cM[bL]) - cY))), (bJ._2 :+ toString((parseIntValue(cT[bL]) + cY))), (bJ._3 + fraction(cY, h, am)), (bJ._4 + cY)) | |
554 | + | else $Tuple4((bJ._1 :+ cM[bL]), (bJ._2 :+ cT[bL]), bJ._3, bJ._4) | |
551 | 555 | } | |
552 | 556 | ||
553 | - | let | |
554 | - | let | |
555 | - | let | |
556 | - | func | |
557 | - | then | |
558 | - | else | |
557 | + | let cn = ap | |
558 | + | let co = size(cn) | |
559 | + | let cp = $Tuple4(nil, nil, 0, 0) | |
560 | + | func cq (cr,cs) = if ((cs >= co)) | |
561 | + | then cr | |
562 | + | else cX(cr, cn[cs]) | |
559 | 563 | ||
560 | - | func | |
561 | - | then | |
564 | + | func ct (cr,cs) = if ((cs >= co)) | |
565 | + | then cr | |
562 | 566 | else throw("List size exceeds 6") | |
563 | 567 | ||
564 | - | | |
568 | + | ct(cq(cq(cq(cq(cq(cq(cp, 0), 1), 2), 3), 4), 5), 6) | |
565 | 569 | } | |
566 | 570 | ||
567 | 571 | ||
568 | - | func | |
572 | + | func cZ (da,db,dc) = if ((da > 0)) | |
569 | 573 | then { | |
570 | - | let | |
571 | - | if (( | |
572 | - | then throw(("This trade does not cover delivery cost of " + | |
574 | + | let dd = fraction(da, aW, al) | |
575 | + | if ((dc >= (da - (3 * dd)))) | |
576 | + | then throw(("This trade does not cover delivery cost of " + aN(dc, 6))) | |
573 | 577 | else { | |
574 | - | let | |
575 | - | let | |
576 | - | let | |
577 | - | (((if (isDefined( | |
578 | - | then [ScriptTransfer(addressFromStringValue(value( | |
579 | - | else nil) :+ ScriptTransfer( | |
578 | + | let de = Q(db) | |
579 | + | let df = getString(aE, de) | |
580 | + | let dg = addressFromStringValue(db) | |
581 | + | (((if (isDefined(df)) | |
582 | + | then [ScriptTransfer(addressFromStringValue(value(df)), dd, ag)] | |
583 | + | else nil) :+ ScriptTransfer(dg, ((da - (3 * dd)) - dc), ag)) :+ ScriptTransfer(aD, dd, ag)) | |
580 | 584 | } | |
581 | 585 | } | |
582 | 586 | else nil | |
583 | 587 | ||
584 | 588 | ||
585 | - | func | |
586 | - | then if ((size( | |
589 | + | func dh (di,dj,dk,dl) = if ((di > 0)) | |
590 | + | then if ((size(dj) != 1)) | |
587 | 591 | then throw("exactly 1 payment must be attached") | |
588 | 592 | else { | |
589 | - | let | |
590 | - | let | |
591 | - | if (if (!(isDefined( | |
593 | + | let dm = dj[0] | |
594 | + | let dn = dm.amount | |
595 | + | if (if (!(isDefined(dm.assetId))) | |
592 | 596 | then true | |
593 | - | else (value( | |
597 | + | else (value(dm.assetId) != ag)) | |
594 | 598 | then throw("USDT payments only!") | |
595 | 599 | else { | |
596 | - | let | |
597 | - | if (( | |
598 | - | then throw((((((("Insufficient payment! Attached=" + | |
599 | - | else if (( | |
600 | - | then throw(("Min shop trade is " + | |
600 | + | let do = (di + dl) | |
601 | + | if ((dn != do)) | |
602 | + | then throw((((((("Insufficient payment! Attached=" + aN(dn, 6)) + ", required=") + aN(di, 6)) + "+") + aN(dl, 6)) + "(delivery fee)")) | |
603 | + | else if ((ao > di)) | |
604 | + | then throw(("Min shop trade is " + aN(ao, 6))) | |
601 | 605 | else { | |
602 | - | let | |
603 | - | let | |
604 | - | let | |
605 | - | (((if (isDefined( | |
606 | - | then [ScriptTransfer(addressFromStringValue(value( | |
607 | - | else nil) :+ ScriptTransfer(addressFromStringValue( | |
606 | + | let dp = fraction(di, aW, al) | |
607 | + | let de = Q(dk) | |
608 | + | let df = getString(aE, de) | |
609 | + | (((if (isDefined(df)) | |
610 | + | then [ScriptTransfer(addressFromStringValue(value(df)), dp, ag)] | |
611 | + | else nil) :+ ScriptTransfer(addressFromStringValue(dk), (di - (3 * dp)), ag)) :+ ScriptTransfer(aD, dp, ag)) | |
608 | 612 | } | |
609 | 613 | } | |
610 | 614 | } | |
611 | - | else if ((size( | |
615 | + | else if ((size(dj) != 0)) | |
612 | 616 | then throw("No payments needed") | |
613 | 617 | else nil | |
614 | 618 | ||
615 | 619 | ||
616 | - | func | |
617 | - | let | |
618 | - | if (!(isDefined(getInteger( | |
619 | - | then throw((("NFT " + | |
620 | + | func dq (dr,db,ds,dt,du,dv) = { | |
621 | + | let dw = value(assetInfo(fromBase58String(dr))) | |
622 | + | if (!(isDefined(getInteger(aE, P(dr))))) | |
623 | + | then throw((("NFT " + dw.name) + " is not staked")) | |
620 | 624 | else { | |
621 | - | let | |
622 | - | if (( | |
625 | + | let dk = valueOrErrorMessage(getString(aE, N(dr)), (("NFT " + dw.name) + " is orphaned")) | |
626 | + | if ((dk == db)) | |
623 | 627 | then throw("You cannot trade with yourself") | |
624 | 628 | else { | |
625 | - | let | |
626 | - | if ((size( | |
629 | + | let dx = split_4C(ds, ":") | |
630 | + | if ((size(dx) != 3)) | |
627 | 631 | then throw("bpOrderStr should contain exactly 2 ':' separators") | |
628 | 632 | else { | |
629 | - | let | |
630 | - | let | |
631 | - | let | |
633 | + | let dy = split(dx[0], "_") | |
634 | + | let dz = split(dx[1], "_") | |
635 | + | let dA = if ((dx[2] == "")) | |
632 | 636 | then nil | |
633 | - | else split_4C( | |
634 | - | if ((size( | |
637 | + | else split_4C(dx[2], "_") | |
638 | + | if ((size(dy) != f)) | |
635 | 639 | then throw("All 6 resources should be passed") | |
636 | - | else if ((size( | |
640 | + | else if ((size(dz) != f)) | |
637 | 641 | then throw("All 6 materials should be passed") | |
638 | 642 | else { | |
639 | - | let | |
640 | - | let | |
641 | - | let | |
642 | - | let | |
643 | - | let | |
643 | + | let dB = aH(invoke(aE, "getWarehouseREADONLY", [dr], nil)) | |
644 | + | let ca = split_4C(dB, ":") | |
645 | + | let cd = split(ca[A], "_") | |
646 | + | let ce = split(ca[B], "_") | |
647 | + | let cf = if ((ca[C] == "")) | |
644 | 648 | then nil | |
645 | - | else split_4C( | |
646 | - | let | |
647 | - | let | |
648 | - | let | |
649 | - | let | |
650 | - | let | |
651 | - | let | |
649 | + | else split_4C(ca[C], "_") | |
650 | + | let dC = parseIntValue(split(ca[D], "_")[E]) | |
651 | + | let bg = X(dr) | |
652 | + | let dD = bf(bg) | |
653 | + | let dE = split(dD[bc], "_") | |
654 | + | let dF = split(dD[bd], "_") | |
655 | + | let dG = if ((dD[be] == "")) | |
652 | 656 | then nil | |
653 | - | else split_4C( | |
654 | - | let | |
655 | - | let | |
656 | - | let | |
657 | - | let | |
658 | - | func | |
659 | - | then | |
660 | - | else | |
657 | + | else split_4C(dD[be], "_") | |
658 | + | let cm = { | |
659 | + | let cn = dy | |
660 | + | let co = size(cn) | |
661 | + | let cp = $Tuple13(nil, nil, nil, 0, 0, 0, 0, dt, cd, dE, p, false, 0) | |
662 | + | func cq (cr,cs) = if ((cs >= co)) | |
663 | + | then cr | |
664 | + | else cy(cr, cn[cs]) | |
661 | 665 | ||
662 | - | func | |
663 | - | then | |
666 | + | func ct (cr,cs) = if ((cs >= co)) | |
667 | + | then cr | |
664 | 668 | else throw("List size exceeds 6") | |
665 | 669 | ||
666 | - | | |
670 | + | ct(cq(cq(cq(cq(cq(cq(cp, 0), 1), 2), 3), 4), 5), 6) | |
667 | 671 | } | |
668 | - | let | |
669 | - | let | |
670 | - | let | |
671 | - | let | |
672 | - | func | |
673 | - | then | |
674 | - | else | |
672 | + | let bA = { | |
673 | + | let cn = dz | |
674 | + | let co = size(cn) | |
675 | + | let cp = $Tuple13(nil, nil, nil, cm._4, cm._5, cm._6, 0, du, ce, dF, q, false, cm._13) | |
676 | + | func cu (cr,cs) = if ((cs >= co)) | |
677 | + | then cr | |
678 | + | else cy(cr, cn[cs]) | |
675 | 679 | ||
676 | - | func | |
677 | - | then | |
680 | + | func cv (cr,cs) = if ((cs >= co)) | |
681 | + | then cr | |
678 | 682 | else throw("List size exceeds 6") | |
679 | 683 | ||
680 | - | | |
684 | + | cv(cu(cu(cu(cu(cu(cu(cp, 0), 1), 2), 3), 4), 5), 6) | |
681 | 685 | } | |
682 | - | let | |
686 | + | let bh = if ((size(dA) != 0)) | |
683 | 687 | then { | |
684 | - | let | |
685 | - | let | |
686 | - | let | |
687 | - | func | |
688 | - | then | |
689 | - | else | |
688 | + | let cn = dA | |
689 | + | let co = size(cn) | |
690 | + | let cp = $Tuple13(nil, nil, nil, bA._4, bA._5, bA._6, 0, dv, cf, dG, r, true, bA._13) | |
691 | + | func cw (cr,cs) = if ((cs >= co)) | |
692 | + | then cr | |
693 | + | else cy(cr, cn[cs]) | |
690 | 694 | ||
691 | - | func | |
692 | - | then | |
695 | + | func cx (cr,cs) = if ((cs >= co)) | |
696 | + | then cr | |
693 | 697 | else throw("List size exceeds 50") | |
694 | 698 | ||
695 | - | | |
699 | + | cx(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cw(cp, 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) | |
696 | 700 | } | |
697 | - | else $Tuple13( | |
698 | - | let | |
699 | - | let | |
701 | + | else $Tuple13(cf, dG, dv, bA._4, bA._5, bA._6, 0, dv, cf, dG, r, true, bA._13) | |
702 | + | let dH = bh._4 | |
703 | + | let dI = if ((0 > (dC - dH))) | |
700 | 704 | then 0 | |
701 | - | else ( | |
702 | - | let | |
703 | - | let | |
704 | - | let | |
705 | - | let | |
706 | - | $Tuple10(StringEntry( | |
705 | + | else (dC - dH) | |
706 | + | let dJ = makeString_2C([ca[z], makeString(cm._1, "_"), makeString(bA._1, "_"), makeString_2C(bh._1, "_"), toString(dI)], ":") | |
707 | + | let dK = makeString_2C([makeString(cm._2, "_"), makeString(bA._2, "_"), makeString_2C(bh._2, "_")], ":") | |
708 | + | let dL = aH(invoke(aE, "saveWarehouse", [dJ, dr], nil)) | |
709 | + | let dM = aK(invoke(aE, "updateAccStats", [dk, fraction(d, bh._13, am)], nil)) | |
710 | + | $Tuple10(StringEntry(bg, dK), cm._3, bA._3, bh._3, bh._5, bh._6, bh._13, dk, dL, dM) | |
707 | 711 | } | |
708 | 712 | } | |
709 | 713 | } | |
710 | 714 | } | |
711 | 715 | } | |
712 | 716 | ||
713 | 717 | ||
714 | - | func | |
715 | - | let | |
716 | - | let | |
717 | - | let | |
718 | - | let | |
719 | - | let | |
720 | - | func | |
721 | - | let | |
722 | - | $Tuple3(( | |
718 | + | func dN (bj) = { | |
719 | + | let dO = (bj / 30) | |
720 | + | let dP = [dO, dO, dO, dO, dO, dO] | |
721 | + | let aJ = toString(dO) | |
722 | + | let cM = [aJ, aJ, aJ, aJ, aJ, aJ] | |
723 | + | let cP = [0, 0, 0, 0, 0, 0] | |
724 | + | func dQ (bJ,dR) = { | |
725 | + | let dS = cL(cM, dR, dP, cP) | |
726 | + | $Tuple3((bJ._1 ++ dS._1), (bJ._2 + dS._3), (bJ._3 + dS._4)) | |
723 | 727 | } | |
724 | 728 | ||
725 | - | let | |
726 | - | let | |
727 | - | let | |
728 | - | let | |
729 | - | func | |
730 | - | then | |
731 | - | else | |
729 | + | let dT = { | |
730 | + | let cn = s | |
731 | + | let co = size(cn) | |
732 | + | let cp = $Tuple3(nil, 0, 0) | |
733 | + | func cq (cr,cs) = if ((cs >= co)) | |
734 | + | then cr | |
735 | + | else dQ(cr, cn[cs]) | |
732 | 736 | ||
733 | - | func | |
734 | - | then | |
737 | + | func ct (cr,cs) = if ((cs >= co)) | |
738 | + | then cr | |
735 | 739 | else throw("List size exceeds 5") | |
736 | 740 | ||
737 | - | | |
741 | + | ct(cq(cq(cq(cq(cq(cp, 0), 1), 2), 3), 4), 5) | |
738 | 742 | } | |
739 | - | let | |
740 | - | let | |
741 | - | let | |
742 | - | let | |
743 | - | let | |
744 | - | let | |
745 | - | $Tuple5( | |
743 | + | let dU = dT._1 | |
744 | + | let bt = dT._2 | |
745 | + | let dV = dT._3 | |
746 | + | let dW = fraction(bt, aX, al) | |
747 | + | let dX = (bt / 100) | |
748 | + | let dY = ((bt - dX) - dW) | |
749 | + | $Tuple5(dU, dY, dW, dX, dV) | |
746 | 750 | } | |
747 | 751 | ||
748 | 752 | ||
749 | - | @Callable(dX) | |
750 | - | func recalcLockedVolumeREADONLY (W,dz) = { | |
751 | - | let bZ = bd(V(W)) | |
752 | - | let dY = bX(dz, bZ, bZ) | |
753 | - | $Tuple2(nil, (dY._4 + dY._5)) | |
753 | + | func dZ (cT,ea,eb,ec,ed) = if ((0 >= ed)) | |
754 | + | then throw("Quantity should be positive") | |
755 | + | else if (if ((0 > ec)) | |
756 | + | then true | |
757 | + | else (ec >= size(u))) | |
758 | + | then throw(("Unknown product idx=" + toString(ec))) | |
759 | + | else { | |
760 | + | let ad = split(u[ec], "_") | |
761 | + | if ((size(ad) != x)) | |
762 | + | then throw(("Fatal: unknown recipe: " + u[ec])) | |
763 | + | else { | |
764 | + | let ee = parseIntValue(ad[w]) | |
765 | + | if ((s[ee] != eb)) | |
766 | + | then throw(((("This product is available in " + s[ee]) + ", not in ") + eb)) | |
767 | + | else { | |
768 | + | func ef (bJ,eg) = { | |
769 | + | let aL = bJ._2 | |
770 | + | let eh = if ((size(ea) > aL)) | |
771 | + | then ea[aL] | |
772 | + | else "0" | |
773 | + | let dS = parseIntValue(eh) | |
774 | + | let bj = (ed * y) | |
775 | + | let ei = if ((aL == ec)) | |
776 | + | then toString((dS + bj)) | |
777 | + | else eh | |
778 | + | $Tuple2((bJ._1 :+ ei), (aL + 1)) | |
779 | + | } | |
780 | + | ||
781 | + | let ej = ( let cn = u | |
782 | + | let co = size(cn) | |
783 | + | let cp = $Tuple2(nil, 0) | |
784 | + | func cq (cr,cs) = if ((cs >= co)) | |
785 | + | then cr | |
786 | + | else ef(cr, cn[cs]) | |
787 | + | ||
788 | + | func ct (cr,cs) = if ((cs >= co)) | |
789 | + | then cr | |
790 | + | else throw("List size exceeds 50") | |
791 | + | ||
792 | + | ct(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cp, 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 | |
793 | + | func ek (bJ,bL) = { | |
794 | + | let el = (((parseIntValue(ad[bL]) * ak) * ed) * parseIntValue(ad[v])) | |
795 | + | let em = parseIntValue(cT[bL]) | |
796 | + | if ((el > em)) | |
797 | + | then throw(((((((("You have " + aN(em, 8)) + " of ") + q[bL]) + ", but recipe requires ") + aN(el, 8)) + " for quantity ") + toString(ed))) | |
798 | + | else if ((el > 0)) | |
799 | + | then $Tuple2((bJ._1 :+ toString((em - el))), (bJ._2 + el)) | |
800 | + | else $Tuple2((bJ._1 :+ cT[bL]), bJ._2) | |
801 | + | } | |
802 | + | ||
803 | + | let en = { | |
804 | + | let cn = ap | |
805 | + | let co = size(cn) | |
806 | + | let cp = $Tuple2(nil, 0) | |
807 | + | func cu (cr,cs) = if ((cs >= co)) | |
808 | + | then cr | |
809 | + | else ek(cr, cn[cs]) | |
810 | + | ||
811 | + | func cv (cr,cs) = if ((cs >= co)) | |
812 | + | then cr | |
813 | + | else throw("List size exceeds 6") | |
814 | + | ||
815 | + | cv(cu(cu(cu(cu(cu(cu(cp, 0), 1), 2), 3), 4), 5), 6) | |
816 | + | } | |
817 | + | $Tuple3(en._1, ej, en._2) | |
818 | + | } | |
819 | + | } | |
820 | + | } | |
821 | + | ||
822 | + | ||
823 | + | @Callable(eo) | |
824 | + | func recalcLockedVolumeREADONLY (Y,dB) = { | |
825 | + | let cb = bf(X(Y)) | |
826 | + | let ep = bZ(dB, cb, cb) | |
827 | + | $Tuple2(nil, (ep._4 + ep._5)) | |
754 | 828 | } | |
755 | 829 | ||
756 | 830 | ||
757 | 831 | ||
758 | - | @Callable( | |
759 | - | func constructorV1 ( | |
832 | + | @Callable(eo) | |
833 | + | func constructorV1 (eq) = if ((eo.caller != this)) | |
760 | 834 | then throw("Permission denied") | |
761 | - | else [StringEntry( | |
835 | + | else [StringEntry(ax(), eq)] | |
762 | 836 | ||
763 | 837 | ||
764 | 838 | ||
765 | - | @Callable( | |
766 | - | func sellResources ( | |
767 | - | let | |
768 | - | if (( | |
839 | + | @Callable(eo) | |
840 | + | func sellResources (cO,cP) = { | |
841 | + | let er = bH() | |
842 | + | if ((er == er)) | |
769 | 843 | then { | |
770 | - | let | |
771 | - | if ((size( | |
844 | + | let V = valueOrErrorMessage(getString(aE, S(toString(eo.caller))), "You don't have a duck staked") | |
845 | + | if ((size(eo.payments) != 0)) | |
772 | 846 | then throw("sellResources doesn't require any payments") | |
773 | 847 | else { | |
774 | - | let | |
775 | - | if (( | |
776 | - | then throw(("Duck location type should be Factory, but is " + | |
848 | + | let es = split(valueOrElse(getString(aE, W(V)), g), "_") | |
849 | + | if ((es[L] != "F")) | |
850 | + | then throw(("Duck location type should be Factory, but is " + es[L])) | |
777 | 851 | else { | |
778 | - | let | |
779 | - | let | |
780 | - | let | |
781 | - | let | |
782 | - | let | |
783 | - | let | |
784 | - | let | |
785 | - | let | |
786 | - | let | |
787 | - | let | |
788 | - | let | |
789 | - | $Tuple2((( | |
852 | + | let et = bE(U(V)) | |
853 | + | let cM = split(et[H], "_") | |
854 | + | let eu = cL(cM, es[M], cO, cP) | |
855 | + | let dU = eu._1 | |
856 | + | let ev = eu._2 | |
857 | + | let bt = eu._3 | |
858 | + | let dV = eu._4 | |
859 | + | let dX = (bt / 100) | |
860 | + | let ew = makeString_2C([et[G], makeString(ev, "_"), et[I], et[J]], ":") | |
861 | + | let ex = aH(invoke(aE, "updateBackpack", [V, ew], nil)) | |
862 | + | let ey = aK(invoke(aE, "updateDuckStats", [V, fraction(a, dV, am)], nil)) | |
863 | + | $Tuple2(((dU :+ ScriptTransfer(eo.caller, (bt - dX), ag)) :+ ScriptTransfer(aD, dX, ag)), $Tuple3(ex, er, ey)) | |
790 | 864 | } | |
791 | 865 | } | |
792 | 866 | } | |
793 | 867 | else throw("Strict value is not equal to itself.") | |
794 | 868 | } | |
795 | 869 | ||
796 | 870 | ||
797 | 871 | ||
798 | - | @Callable( | |
799 | - | func sellResourcesWorld ( | |
872 | + | @Callable(eo) | |
873 | + | func sellResourcesWorld (R,bj) = if ((eo.caller != aG)) | |
800 | 874 | then throw("Permission denied") | |
801 | 875 | else { | |
802 | - | let | |
803 | - | let | |
804 | - | let | |
805 | - | let | |
806 | - | let | |
807 | - | let | |
808 | - | if ((0 >= | |
809 | - | then throw(("This trade does not cover delivery cost of " + | |
876 | + | let ez = dN(bj) | |
877 | + | let dU = ez._1 | |
878 | + | let dY = ez._2 | |
879 | + | let dW = ez._3 | |
880 | + | let dX = ez._4 | |
881 | + | let dV = ez._5 | |
882 | + | if ((0 >= dY)) | |
883 | + | then throw(("This trade does not cover delivery cost of " + aN(dW, 6))) | |
810 | 884 | else { | |
811 | - | let | |
812 | - | $Tuple2(((( | |
885 | + | let ey = aK(invoke(aE, "updateAccStats", [R, fraction(a, dV, am)], nil)) | |
886 | + | $Tuple2((((dU :+ IntegerEntry(aa, (valueOrElse(getInteger(aa), 0) + dW))) :+ ScriptTransfer(aD, dX, ag)) :+ ScriptTransfer(aF, dY, ag)), $Tuple2(dY, ey)) | |
813 | 887 | } | |
814 | 888 | } | |
815 | 889 | ||
816 | 890 | ||
817 | 891 | ||
818 | - | @Callable( | |
819 | - | func sellResourcesWorldREADONLY ( | |
820 | - | let | |
821 | - | $Tuple2(nil, | |
892 | + | @Callable(eo) | |
893 | + | func sellResourcesWorldREADONLY (bj) = { | |
894 | + | let dY = dN(bj)._2 | |
895 | + | $Tuple2(nil, dY) | |
822 | 896 | } | |
823 | 897 | ||
824 | 898 | ||
825 | 899 | ||
826 | - | @Callable( | |
827 | - | func sellResourcesDuckDelivery ( | |
900 | + | @Callable(eo) | |
901 | + | func sellResourcesDuckDelivery (cO,cP,eA) = if (!(ae)) | |
828 | 902 | then throw("Delivery feature is turned off!") | |
829 | 903 | else { | |
830 | - | let | |
831 | - | if (( | |
904 | + | let er = bH() | |
905 | + | if ((er == er)) | |
832 | 906 | then { | |
833 | - | let | |
834 | - | if ((size( | |
907 | + | let V = valueOrErrorMessage(getString(aE, S(toString(eo.caller))), "You don't have a duck staked") | |
908 | + | if ((size(eo.payments) != 0)) | |
835 | 909 | then throw("sellResources doesn't require any payments") | |
836 | 910 | else { | |
837 | - | let ec = bC(S(T)) | |
838 | - | let cK = split(ec[F], "_") | |
839 | - | let ek = cJ(cK, ej, cM, cN) | |
840 | - | let dS = ek._1 | |
841 | - | let ee = ek._2 | |
842 | - | let br = ek._3 | |
843 | - | let dT = ek._4 | |
844 | - | let ef = makeString_2C([ec[E], makeString(ee, "_"), ec[G], ec[H]], ":") | |
845 | - | let eg = aF(invoke(aC, "updateBackpack", [T, ef], nil)) | |
846 | - | let eh = aI(invoke(aC, "updateDuckStats", [T, fraction(a, dT, ak)], nil)) | |
847 | - | let el = fraction(br, aV, aj) | |
848 | - | let dU = if ((k > el)) | |
849 | - | then k | |
850 | - | else el | |
851 | - | let dV = (br / 100) | |
852 | - | if ((dU >= (br - dV))) | |
853 | - | then throw(("This trade does not cover delivery cost of " + aL(dU, 6))) | |
911 | + | let et = bE(U(V)) | |
912 | + | let cM = split(et[H], "_") | |
913 | + | let eB = cL(cM, eA, cO, cP) | |
914 | + | let dU = eB._1 | |
915 | + | let ev = eB._2 | |
916 | + | let bt = eB._3 | |
917 | + | let dV = eB._4 | |
918 | + | let ew = makeString_2C([et[G], makeString(ev, "_"), et[I], et[J]], ":") | |
919 | + | let ex = aH(invoke(aE, "updateBackpack", [V, ew], nil)) | |
920 | + | let ey = aK(invoke(aE, "updateDuckStats", [V, fraction(a, dV, am)], nil)) | |
921 | + | let eC = fraction(bt, aX, al) | |
922 | + | let dW = max([eC, k]) | |
923 | + | let dX = (bt / 100) | |
924 | + | if ((dW >= (bt - dX))) | |
925 | + | then throw(("This trade does not cover delivery cost of " + aN(dW, 6))) | |
854 | 926 | else { | |
855 | - | let | |
856 | - | $Tuple2(((( | |
927 | + | let eD = valueOrElse(getInteger(aa), 0) | |
928 | + | $Tuple2((((dU :+ ScriptTransfer(eo.caller, ((bt - dX) - dW), ag)) :+ IntegerEntry(aa, (eD + dW))) :+ ScriptTransfer(aD, dX, ag)), $Tuple3(ex, er, ey)) | |
857 | 929 | } | |
858 | 930 | } | |
859 | 931 | } | |
860 | 932 | else throw("Strict value is not equal to itself.") | |
861 | 933 | } | |
862 | 934 | ||
863 | 935 | ||
864 | 936 | ||
865 | - | @Callable( | |
866 | - | func sellResourcesLandDelivery ( | |
937 | + | @Callable(eo) | |
938 | + | func sellResourcesLandDelivery (cO,cP,Y,eA) = if (!(ae)) | |
867 | 939 | then throw("Delivery feature is turned off!") | |
868 | 940 | else { | |
869 | - | let | |
870 | - | if (( | |
871 | - | then if ((size( | |
941 | + | let er = bH() | |
942 | + | if ((er == er)) | |
943 | + | then if ((size(eo.payments) != 0)) | |
872 | 944 | then throw("sellResources doesn't require any payments") | |
873 | 945 | else { | |
874 | - | let | |
875 | - | let | |
876 | - | let | |
877 | - | if (!(isDefined(getInteger( | |
878 | - | then throw((("NFT " + | |
946 | + | let eE = eo.caller | |
947 | + | let R = toString(eE) | |
948 | + | let eF = value(assetInfo(fromBase58String(Y))) | |
949 | + | if (!(isDefined(getInteger(aE, P(Y))))) | |
950 | + | then throw((("NFT " + eF.name) + " is not staked")) | |
879 | 951 | else { | |
880 | - | let | |
881 | - | if (( | |
952 | + | let eG = valueOrErrorMessage(getString(aE, N(Y)), (("NFT " + eF.name) + " is orphaned")) | |
953 | + | if ((eG != R)) | |
882 | 954 | then throw((e + " is not yours")) | |
883 | 955 | else { | |
884 | - | let dz = aF(invoke(aC, "getWarehouseREADONLY", [W], nil)) | |
885 | - | let bY = split_4C(dz, ":") | |
886 | - | let cK = split(bY[y], "_") | |
887 | - | let eq = cJ(cK, ej, cM, cN) | |
888 | - | let dS = eq._1 | |
889 | - | let ee = eq._2 | |
890 | - | let br = eq._3 | |
891 | - | let dT = eq._4 | |
892 | - | let dH = makeString_2C([bY[x], makeString(ee, "_"), bY[z], bY[A], bY[B]], ":") | |
893 | - | let dJ = aF(invoke(aC, "saveWarehouse", [dH, W], nil)) | |
894 | - | let eh = aI(invoke(aC, "updateAccStats", [P, fraction(a, dT, ak)], nil)) | |
895 | - | let el = fraction(br, aV, aj) | |
896 | - | let dU = if ((k > el)) | |
897 | - | then k | |
898 | - | else el | |
899 | - | let dV = (br / 100) | |
900 | - | if ((dU >= (br - dV))) | |
901 | - | then throw(("This trade does not cover delivery cost of " + aL(dU, 6))) | |
956 | + | let dB = aH(invoke(aE, "getWarehouseREADONLY", [Y], nil)) | |
957 | + | let ca = split_4C(dB, ":") | |
958 | + | let cM = split(ca[A], "_") | |
959 | + | let eH = cL(cM, eA, cO, cP) | |
960 | + | let dU = eH._1 | |
961 | + | let ev = eH._2 | |
962 | + | let bt = eH._3 | |
963 | + | let dV = eH._4 | |
964 | + | let dJ = makeString_2C([ca[z], makeString(ev, "_"), ca[B], ca[C], ca[D]], ":") | |
965 | + | let dL = aH(invoke(aE, "saveWarehouse", [dJ, Y], nil)) | |
966 | + | let ey = aK(invoke(aE, "updateAccStats", [R, fraction(a, dV, am)], nil)) | |
967 | + | let eC = fraction(bt, aX, al) | |
968 | + | let dW = max([eC, k]) | |
969 | + | let dX = (bt / 100) | |
970 | + | if ((dW >= (bt - dX))) | |
971 | + | then throw(("This trade does not cover delivery cost of " + aN(dW, 6))) | |
902 | 972 | else { | |
903 | - | let | |
904 | - | $Tuple2(((( | |
973 | + | let eD = valueOrElse(getInteger(aa), 0) | |
974 | + | $Tuple2((((dU :+ ScriptTransfer(eo.caller, ((bt - dX) - dW), ag)) :+ IntegerEntry(aa, (eD + dW))) :+ ScriptTransfer(aD, dX, ag)), $Tuple3(dL, er, ey)) | |
905 | 975 | } | |
906 | 976 | } | |
907 | 977 | } | |
908 | 978 | } | |
909 | 979 | else throw("Strict value is not equal to itself.") | |
910 | 980 | } | |
911 | 981 | ||
912 | 982 | ||
913 | 983 | ||
914 | - | @Callable( | |
915 | - | func buyMaterials ( | |
916 | - | let | |
917 | - | if (( | |
984 | + | @Callable(eo) | |
985 | + | func buyMaterials (cO,cU) = { | |
986 | + | let er = bH() | |
987 | + | if ((er == er)) | |
918 | 988 | then { | |
919 | - | let | |
920 | - | if ((size( | |
989 | + | let V = valueOrErrorMessage(getString(aE, S(toString(eo.caller))), "You don't have a duck staked") | |
990 | + | if ((size(eo.payments) != 1)) | |
921 | 991 | then throw("exactly 1 payment must be attached") | |
922 | 992 | else { | |
923 | - | let | |
924 | - | let | |
925 | - | if (if (!(isDefined( | |
993 | + | let dm = eo.payments[0] | |
994 | + | let dn = dm.amount | |
995 | + | if (if (!(isDefined(dm.assetId))) | |
926 | 996 | then true | |
927 | - | else (value( | |
997 | + | else (value(dm.assetId) != ag)) | |
928 | 998 | then throw("USDT payments only!") | |
929 | 999 | else { | |
930 | - | let | |
931 | - | if (( | |
932 | - | then throw(("Duck location type should be Factory, but is " + | |
1000 | + | let es = split(valueOrElse(getString(aE, W(V)), g), "_") | |
1001 | + | if ((es[L] != "F")) | |
1002 | + | then throw(("Duck location type should be Factory, but is " + es[L])) | |
933 | 1003 | else { | |
934 | - | let | |
935 | - | let | |
936 | - | let | |
937 | - | let | |
938 | - | let | |
939 | - | let | |
940 | - | let | |
941 | - | if (( | |
942 | - | then throw(((("Insufficient payment! Attached=" + | |
1004 | + | let et = bE(U(V)) | |
1005 | + | let cT = split(et[I], "_") | |
1006 | + | let eI = cS(cT, es[M], cO, cU) | |
1007 | + | let dU = eI._1 | |
1008 | + | let eJ = eI._2 | |
1009 | + | let bC = eI._3 | |
1010 | + | let eK = eI._4 | |
1011 | + | if ((bC > dn)) | |
1012 | + | then throw(((("Insufficient payment! Attached=" + aN(dn, 6)) + ", required=") + aN(bC, 6))) | |
943 | 1013 | else { | |
944 | - | let | |
945 | - | let | |
946 | - | let | |
947 | - | then [ScriptTransfer( | |
1014 | + | let ew = makeString([et[G], et[H], makeString(eJ, "_"), et[J]], ":") | |
1015 | + | let ex = aH(invoke(aE, "updateBackpack", [V, ew], nil)) | |
1016 | + | let az = if (((dn - bC) > 0)) | |
1017 | + | then [ScriptTransfer(eo.caller, (dn - bC), ag)] | |
948 | 1018 | else nil | |
949 | - | let | |
950 | - | let | |
951 | - | $Tuple2((( | |
1019 | + | let dX = (bC / 100) | |
1020 | + | let ey = aK(invoke(aE, "updateDuckStats", [V, fraction(a, eK, am)], nil)) | |
1021 | + | $Tuple2(((dU ++ az) :+ ScriptTransfer(aD, dX, ag)), $Tuple3(ex, er, ey)) | |
952 | 1022 | } | |
953 | 1023 | } | |
954 | 1024 | } | |
955 | 1025 | } | |
956 | 1026 | } | |
957 | 1027 | else throw("Strict value is not equal to itself.") | |
958 | 1028 | } | |
959 | 1029 | ||
960 | 1030 | ||
961 | 1031 | ||
962 | - | @Callable( | |
963 | - | func buyMaterialsDuckDelivery ( | |
1032 | + | @Callable(eo) | |
1033 | + | func buyMaterialsDuckDelivery (cO,cU,eA) = if (!(ae)) | |
964 | 1034 | then throw("Delivery feature is turned off!") | |
965 | 1035 | else { | |
966 | - | let | |
967 | - | if (( | |
1036 | + | let er = bH() | |
1037 | + | if ((er == er)) | |
968 | 1038 | then { | |
969 | - | let | |
970 | - | if ((size( | |
1039 | + | let V = valueOrErrorMessage(getString(aE, S(toString(eo.caller))), "You don't have a duck staked") | |
1040 | + | if ((size(eo.payments) != 1)) | |
971 | 1041 | then throw("exactly 1 payment must be attached") | |
972 | 1042 | else { | |
973 | - | let | |
974 | - | let | |
975 | - | if (if (!(isDefined( | |
1043 | + | let dm = eo.payments[0] | |
1044 | + | let dn = dm.amount | |
1045 | + | if (if (!(isDefined(dm.assetId))) | |
976 | 1046 | then true | |
977 | - | else (value( | |
1047 | + | else (value(dm.assetId) != ag)) | |
978 | 1048 | then throw("USDT payments only!") | |
979 | 1049 | else { | |
980 | - | let ec = bC(S(T)) | |
981 | - | let cR = split(ec[G], "_") | |
982 | - | let eu = cQ(cR, ej, cM, cS) | |
983 | - | let dS = eu._1 | |
984 | - | let es = eu._2 | |
985 | - | let bA = eu._3 | |
986 | - | let et = eu._4 | |
987 | - | let ef = makeString([ec[E], ec[F], makeString(es, "_"), ec[H]], ":") | |
988 | - | let eg = aF(invoke(aC, "updateBackpack", [T, ef], nil)) | |
989 | - | let eh = aI(invoke(aC, "updateDuckStats", [T, fraction(a, et, ak)], nil)) | |
990 | - | let el = fraction(bA, aV, aj) | |
991 | - | let dU = if ((k > el)) | |
992 | - | then k | |
993 | - | else el | |
994 | - | let dm = (bA + dU) | |
995 | - | if ((dm > dl)) | |
996 | - | then throw((((((("Insufficient payment! Attached=" + aL(dl, 6)) + ", required=") + aL(bA, 6)) + "+") + aL(dU, 6)) + "(delivery fee)")) | |
1050 | + | let et = bE(U(V)) | |
1051 | + | let cT = split(et[I], "_") | |
1052 | + | let eL = cS(cT, eA, cO, cU) | |
1053 | + | let dU = eL._1 | |
1054 | + | let eJ = eL._2 | |
1055 | + | let bC = eL._3 | |
1056 | + | let eK = eL._4 | |
1057 | + | let ew = makeString([et[G], et[H], makeString(eJ, "_"), et[J]], ":") | |
1058 | + | let ex = aH(invoke(aE, "updateBackpack", [V, ew], nil)) | |
1059 | + | let ey = aK(invoke(aE, "updateDuckStats", [V, fraction(a, eK, am)], nil)) | |
1060 | + | let eC = fraction(bC, aX, al) | |
1061 | + | let dW = max([eC, k]) | |
1062 | + | let do = (bC + dW) | |
1063 | + | if ((do > dn)) | |
1064 | + | then throw((((((("Insufficient payment! Attached=" + aN(dn, 6)) + ", required=") + aN(bC, 6)) + "+") + aN(dW, 6)) + "(delivery fee)")) | |
997 | 1065 | else { | |
998 | - | let | |
999 | - | then [ScriptTransfer( | |
1066 | + | let az = if (((dn - do) > 0)) | |
1067 | + | then [ScriptTransfer(eo.caller, (dn - do), ag)] | |
1000 | 1068 | else nil | |
1001 | - | let | |
1002 | - | let | |
1003 | - | $Tuple2(((( | |
1069 | + | let dX = (bC / 100) | |
1070 | + | let eD = valueOrElse(getInteger(aa), 0) | |
1071 | + | $Tuple2((((dU ++ az) :+ ScriptTransfer(aD, dX, ag)) :+ IntegerEntry(aa, (eD + dW))), $Tuple3(ex, er, ey)) | |
1004 | 1072 | } | |
1005 | 1073 | } | |
1006 | 1074 | } | |
1007 | 1075 | } | |
1008 | 1076 | else throw("Strict value is not equal to itself.") | |
1009 | 1077 | } | |
1010 | 1078 | ||
1011 | 1079 | ||
1012 | 1080 | ||
1013 | - | @Callable( | |
1014 | - | func buyMaterialsLandDelivery ( | |
1081 | + | @Callable(eo) | |
1082 | + | func buyMaterialsLandDelivery (cO,cU,Y,eA) = if (!(ae)) | |
1015 | 1083 | then throw("Delivery feature is turned off!") | |
1016 | 1084 | else { | |
1017 | - | let | |
1018 | - | if (( | |
1019 | - | then if ((size( | |
1085 | + | let er = bH() | |
1086 | + | if ((er == er)) | |
1087 | + | then if ((size(eo.payments) != 1)) | |
1020 | 1088 | then throw("exactly 1 payment must be attached") | |
1021 | 1089 | else { | |
1022 | - | let | |
1023 | - | let | |
1024 | - | if (if (!(isDefined( | |
1090 | + | let dm = eo.payments[0] | |
1091 | + | let dn = dm.amount | |
1092 | + | if (if (!(isDefined(dm.assetId))) | |
1025 | 1093 | then true | |
1026 | - | else (value( | |
1094 | + | else (value(dm.assetId) != ag)) | |
1027 | 1095 | then throw("USDT payments only!") | |
1028 | 1096 | else { | |
1029 | - | let | |
1030 | - | let | |
1031 | - | let | |
1032 | - | if (!(isDefined(getInteger( | |
1033 | - | then throw((("NFT " + | |
1097 | + | let eE = eo.caller | |
1098 | + | let R = toString(eE) | |
1099 | + | let eF = value(assetInfo(fromBase58String(Y))) | |
1100 | + | if (!(isDefined(getInteger(aE, P(Y))))) | |
1101 | + | then throw((("NFT " + eF.name) + " is not staked")) | |
1034 | 1102 | else { | |
1035 | - | let | |
1036 | - | if (( | |
1103 | + | let eG = valueOrErrorMessage(getString(aE, N(Y)), (("NFT " + eF.name) + " is orphaned")) | |
1104 | + | if ((eG != R)) | |
1037 | 1105 | then throw((e + " is not yours")) | |
1038 | 1106 | else { | |
1039 | - | let dz = aF(invoke(aC, "getWarehouseREADONLY", [W], nil)) | |
1040 | - | let bY = split_4C(dz, ":") | |
1041 | - | let cR = split(bY[z], "_") | |
1042 | - | let ev = cQ(cR, ej, cM, cS) | |
1043 | - | let dS = ev._1 | |
1044 | - | let es = ev._2 | |
1045 | - | let bA = ev._3 | |
1046 | - | let et = ev._4 | |
1047 | - | let dH = makeString_2C([bY[x], bY[y], makeString(es, "_"), bY[A], bY[B]], ":") | |
1048 | - | let dJ = aF(invoke(aC, "saveWarehouse", [dH, W], nil)) | |
1049 | - | let eh = aI(invoke(aC, "updateAccStats", [P, fraction(a, et, ak)], nil)) | |
1050 | - | let el = fraction(bA, aV, aj) | |
1051 | - | let dU = if ((k > el)) | |
1052 | - | then k | |
1053 | - | else el | |
1054 | - | let dm = (bA + dU) | |
1055 | - | if ((dm > dl)) | |
1056 | - | then throw((((((("Insufficient payment! Attached=" + aL(dl, 6)) + ", required=") + aL(bA, 6)) + "+") + aL(dU, 6)) + "(delivery fee)")) | |
1107 | + | let dB = aH(invoke(aE, "getWarehouseREADONLY", [Y], nil)) | |
1108 | + | let ca = split_4C(dB, ":") | |
1109 | + | let cT = split(ca[B], "_") | |
1110 | + | let eM = cS(cT, eA, cO, cU) | |
1111 | + | let dU = eM._1 | |
1112 | + | let eJ = eM._2 | |
1113 | + | let bC = eM._3 | |
1114 | + | let eK = eM._4 | |
1115 | + | let dJ = makeString_2C([ca[z], ca[A], makeString(eJ, "_"), ca[C], ca[D]], ":") | |
1116 | + | let dL = aH(invoke(aE, "saveWarehouse", [dJ, Y], nil)) | |
1117 | + | let ey = aK(invoke(aE, "updateAccStats", [R, fraction(a, eK, am)], nil)) | |
1118 | + | let eC = fraction(bC, aX, al) | |
1119 | + | let dW = max([eC, k]) | |
1120 | + | let do = (bC + dW) | |
1121 | + | if ((do > dn)) | |
1122 | + | then throw((((((("Insufficient payment! Attached=" + aN(dn, 6)) + ", required=") + aN(bC, 6)) + "+") + aN(dW, 6)) + "(delivery fee)")) | |
1057 | 1123 | else { | |
1058 | - | let | |
1059 | - | then [ScriptTransfer( | |
1124 | + | let az = if (((dn - do) > 0)) | |
1125 | + | then [ScriptTransfer(eo.caller, (dn - do), ag)] | |
1060 | 1126 | else nil | |
1061 | - | let | |
1062 | - | let | |
1063 | - | $Tuple2(((( | |
1127 | + | let dX = (bC / 100) | |
1128 | + | let eD = valueOrElse(getInteger(aa), 0) | |
1129 | + | $Tuple2((((dU ++ az) :+ ScriptTransfer(aD, dX, ag)) :+ IntegerEntry(aa, (eD + dW))), $Tuple3(dL, er, ey)) | |
1064 | 1130 | } | |
1065 | 1131 | } | |
1066 | 1132 | } | |
1067 | 1133 | } | |
1068 | 1134 | } | |
1069 | 1135 | else throw("Strict value is not equal to itself.") | |
1070 | 1136 | } | |
1071 | 1137 | ||
1072 | 1138 | ||
1073 | 1139 | ||
1074 | - | @Callable( | |
1075 | - | func exchangeResources ( | |
1076 | - | let | |
1077 | - | if (( | |
1140 | + | @Callable(eo) | |
1141 | + | func exchangeResources (cO) = { | |
1142 | + | let er = bH() | |
1143 | + | if ((er == er)) | |
1078 | 1144 | then { | |
1079 | - | let | |
1080 | - | if ((size( | |
1145 | + | let V = valueOrErrorMessage(getString(aE, S(toString(eo.caller))), "You don't have a duck staked") | |
1146 | + | if ((size(eo.payments) != 1)) | |
1081 | 1147 | then throw("exactly 1 payment must be attached") | |
1082 | 1148 | else { | |
1083 | - | let | |
1084 | - | let | |
1085 | - | if (if (!(isDefined( | |
1149 | + | let dm = eo.payments[0] | |
1150 | + | let dn = dm.amount | |
1151 | + | if (if (!(isDefined(dm.assetId))) | |
1086 | 1152 | then true | |
1087 | - | else (value( | |
1153 | + | else (value(dm.assetId) != ag)) | |
1088 | 1154 | then throw("USDT payments only!") | |
1089 | 1155 | else { | |
1090 | - | let | |
1091 | - | if (( | |
1092 | - | then throw(("Duck location type should be Factory, but is " + | |
1156 | + | let es = split(valueOrElse(getString(aE, W(V)), g), "_") | |
1157 | + | if ((es[L] != "F")) | |
1158 | + | then throw(("Duck location type should be Factory, but is " + es[L])) | |
1093 | 1159 | else { | |
1094 | - | let | |
1095 | - | let | |
1096 | - | let | |
1097 | - | let | |
1098 | - | let | |
1099 | - | let | |
1100 | - | let | |
1101 | - | let | |
1102 | - | if (( | |
1103 | - | then throw(((("Insufficient payment! Attached=" + | |
1160 | + | let et = bE(U(V)) | |
1161 | + | let cM = split(et[H], "_") | |
1162 | + | let cT = split(et[I], "_") | |
1163 | + | let eN = cW(cM, cT, cO) | |
1164 | + | let ev = eN._1 | |
1165 | + | let eJ = eN._2 | |
1166 | + | let bC = eN._3 | |
1167 | + | let eO = eN._4 | |
1168 | + | if ((bC > dn)) | |
1169 | + | then throw(((("Insufficient payment! Attached=" + aN(dn, 6)) + ", required=") + aN(bC, 6))) | |
1104 | 1170 | else { | |
1105 | - | let | |
1106 | - | let | |
1107 | - | let | |
1108 | - | then [ScriptTransfer( | |
1171 | + | let ew = makeString([et[G], makeString(ev, "_"), makeString(eJ, "_"), et[J]], ":") | |
1172 | + | let ex = aH(invoke(aE, "updateBackpack", [V, ew], nil)) | |
1173 | + | let az = if (((dn - bC) > 0)) | |
1174 | + | then [ScriptTransfer(eo.caller, (dn - bC), ag)] | |
1109 | 1175 | else nil | |
1110 | - | let | |
1111 | - | let | |
1112 | - | $Tuple2(( | |
1176 | + | let dX = (bC / 100) | |
1177 | + | let ey = aK(invoke(aE, "updateDuckStats", [V, fraction(a, eO, am)], nil)) | |
1178 | + | $Tuple2((az :+ ScriptTransfer(aD, dX, ag)), $Tuple3(ex, er, ey)) | |
1113 | 1179 | } | |
1114 | 1180 | } | |
1115 | 1181 | } | |
1116 | 1182 | } | |
1117 | 1183 | } | |
1118 | 1184 | else throw("Strict value is not equal to itself.") | |
1119 | 1185 | } | |
1120 | 1186 | ||
1121 | 1187 | ||
1122 | 1188 | ||
1123 | - | @Callable( | |
1124 | - | func exchangeResourcesDuckDelivery ( | |
1189 | + | @Callable(eo) | |
1190 | + | func exchangeResourcesDuckDelivery (cO) = if (!(ae)) | |
1125 | 1191 | then throw("Delivery feature is turned off!") | |
1126 | 1192 | else { | |
1127 | - | let | |
1128 | - | if (( | |
1193 | + | let er = bH() | |
1194 | + | if ((er == er)) | |
1129 | 1195 | then { | |
1130 | - | let | |
1131 | - | if ((size( | |
1196 | + | let V = valueOrErrorMessage(getString(aE, S(toString(eo.caller))), "You don't have a duck staked") | |
1197 | + | if ((size(eo.payments) != 1)) | |
1132 | 1198 | then throw("exactly 1 payment must be attached") | |
1133 | 1199 | else { | |
1134 | - | let | |
1135 | - | let | |
1136 | - | if (if (!(isDefined( | |
1200 | + | let dm = eo.payments[0] | |
1201 | + | let dn = dm.amount | |
1202 | + | if (if (!(isDefined(dm.assetId))) | |
1137 | 1203 | then true | |
1138 | - | else (value( | |
1204 | + | else (value(dm.assetId) != ag)) | |
1139 | 1205 | then throw("USDT payments only!") | |
1140 | 1206 | else { | |
1141 | - | let ec = bC(S(T)) | |
1142 | - | let cK = split(ec[F], "_") | |
1143 | - | let cR = split(ec[G], "_") | |
1144 | - | let ey = cU(cK, cR, cM) | |
1145 | - | let ee = ey._1 | |
1146 | - | let es = ey._2 | |
1147 | - | let bA = ey._3 | |
1148 | - | let ex = ey._4 | |
1149 | - | let el = fraction(bA, aW, aj) | |
1150 | - | let dU = if ((l > el)) | |
1151 | - | then l | |
1152 | - | else el | |
1153 | - | let dm = (bA + dU) | |
1154 | - | if ((dm > dl)) | |
1155 | - | then throw((((((("Insufficient payment! Attached=" + aL(dl, 6)) + ", required=") + aL(bA, 6)) + "+") + aL(dU, 6)) + "(delivery fee)")) | |
1207 | + | let et = bE(U(V)) | |
1208 | + | let cM = split(et[H], "_") | |
1209 | + | let cT = split(et[I], "_") | |
1210 | + | let eP = cW(cM, cT, cO) | |
1211 | + | let ev = eP._1 | |
1212 | + | let eJ = eP._2 | |
1213 | + | let bC = eP._3 | |
1214 | + | let eO = eP._4 | |
1215 | + | let eC = fraction(bC, aY, al) | |
1216 | + | let dW = max([eC, l]) | |
1217 | + | let do = (bC + dW) | |
1218 | + | if ((do > dn)) | |
1219 | + | then throw((((((("Insufficient payment! Attached=" + aN(dn, 6)) + ", required=") + aN(bC, 6)) + "+") + aN(dW, 6)) + "(delivery fee)")) | |
1156 | 1220 | else { | |
1157 | - | let | |
1158 | - | let | |
1159 | - | let | |
1160 | - | then [ScriptTransfer( | |
1221 | + | let ew = makeString([et[G], makeString(ev, "_"), makeString(eJ, "_"), et[J]], ":") | |
1222 | + | let ex = aH(invoke(aE, "updateBackpack", [V, ew], nil)) | |
1223 | + | let az = if (((dn - do) > 0)) | |
1224 | + | then [ScriptTransfer(eo.caller, (dn - do), ag)] | |
1161 | 1225 | else nil | |
1162 | - | let | |
1163 | - | let | |
1164 | - | let | |
1165 | - | $Tuple2((( | |
1226 | + | let dX = (bC / 100) | |
1227 | + | let ey = aK(invoke(aE, "updateDuckStats", [V, fraction(a, eO, am)], nil)) | |
1228 | + | let eD = valueOrElse(getInteger(aa), 0) | |
1229 | + | $Tuple2(((az :+ ScriptTransfer(aD, dX, ag)) :+ IntegerEntry(aa, (eD + dW))), $Tuple3(ex, er, ey)) | |
1166 | 1230 | } | |
1167 | 1231 | } | |
1168 | 1232 | } | |
1169 | 1233 | } | |
1170 | 1234 | else throw("Strict value is not equal to itself.") | |
1171 | 1235 | } | |
1172 | 1236 | ||
1173 | 1237 | ||
1174 | 1238 | ||
1175 | - | @Callable( | |
1176 | - | func exchangeResourcesLandDelivery ( | |
1239 | + | @Callable(eo) | |
1240 | + | func exchangeResourcesLandDelivery (cO,Y) = if (!(ae)) | |
1177 | 1241 | then throw("Delivery feature is turned off!") | |
1178 | 1242 | else { | |
1179 | - | let | |
1180 | - | if (( | |
1181 | - | then if ((size( | |
1243 | + | let er = bH() | |
1244 | + | if ((er == er)) | |
1245 | + | then if ((size(eo.payments) != 1)) | |
1182 | 1246 | then throw("exactly 1 payment must be attached") | |
1183 | 1247 | else { | |
1184 | - | let | |
1185 | - | let | |
1186 | - | if (if (!(isDefined( | |
1248 | + | let dm = eo.payments[0] | |
1249 | + | let dn = dm.amount | |
1250 | + | if (if (!(isDefined(dm.assetId))) | |
1187 | 1251 | then true | |
1188 | - | else (value( | |
1252 | + | else (value(dm.assetId) != ag)) | |
1189 | 1253 | then throw("USDT payments only!") | |
1190 | 1254 | else { | |
1191 | - | let | |
1192 | - | let | |
1193 | - | let | |
1194 | - | if (!(isDefined(getInteger( | |
1195 | - | then throw((("NFT " + | |
1255 | + | let eE = eo.caller | |
1256 | + | let R = toString(eE) | |
1257 | + | let eF = value(assetInfo(fromBase58String(Y))) | |
1258 | + | if (!(isDefined(getInteger(aE, P(Y))))) | |
1259 | + | then throw((("NFT " + eF.name) + " is not staked")) | |
1196 | 1260 | else { | |
1197 | - | let | |
1198 | - | if (( | |
1261 | + | let eG = valueOrErrorMessage(getString(aE, N(Y)), (("NFT " + eF.name) + " is orphaned")) | |
1262 | + | if ((eG != R)) | |
1199 | 1263 | then throw((e + " is not yours")) | |
1200 | 1264 | else { | |
1201 | - | let dz = aF(invoke(aC, "getWarehouseREADONLY", [W], nil)) | |
1202 | - | let bY = split_4C(dz, ":") | |
1203 | - | let cK = split(bY[y], "_") | |
1204 | - | let cR = split(bY[z], "_") | |
1205 | - | let ez = cU(cK, cR, cM) | |
1206 | - | let ee = ez._1 | |
1207 | - | let es = ez._2 | |
1208 | - | let bA = ez._3 | |
1209 | - | let ex = ez._4 | |
1210 | - | let dH = makeString_2C([bY[x], makeString(ee, "_"), makeString(es, "_"), bY[A], bY[B]], ":") | |
1211 | - | let dJ = aF(invoke(aC, "saveWarehouse", [dH, W], nil)) | |
1212 | - | let eh = aI(invoke(aC, "updateAccStats", [P, fraction(a, ex, ak)], nil)) | |
1213 | - | let el = fraction(bA, aW, aj) | |
1214 | - | let dU = if ((l > el)) | |
1215 | - | then l | |
1216 | - | else el | |
1217 | - | let dm = (bA + dU) | |
1218 | - | if ((dm > dl)) | |
1219 | - | then throw((((((("Insufficient payment! Attached=" + aL(dl, 6)) + ", required=") + aL(bA, 6)) + "+") + aL(dU, 6)) + "(delivery fee)")) | |
1265 | + | let dB = aH(invoke(aE, "getWarehouseREADONLY", [Y], nil)) | |
1266 | + | let ca = split_4C(dB, ":") | |
1267 | + | let cM = split(ca[A], "_") | |
1268 | + | let cT = split(ca[B], "_") | |
1269 | + | let eQ = cW(cM, cT, cO) | |
1270 | + | let ev = eQ._1 | |
1271 | + | let eJ = eQ._2 | |
1272 | + | let bC = eQ._3 | |
1273 | + | let eO = eQ._4 | |
1274 | + | let dJ = makeString_2C([ca[z], makeString(ev, "_"), makeString(eJ, "_"), ca[C], ca[D]], ":") | |
1275 | + | let dL = aH(invoke(aE, "saveWarehouse", [dJ, Y], nil)) | |
1276 | + | let ey = aK(invoke(aE, "updateAccStats", [R, fraction(a, eO, am)], nil)) | |
1277 | + | let eC = fraction(bC, aY, al) | |
1278 | + | let dW = max([eC, l]) | |
1279 | + | let do = (bC + dW) | |
1280 | + | if ((do > dn)) | |
1281 | + | then throw((((((("Insufficient payment! Attached=" + aN(dn, 6)) + ", required=") + aN(bC, 6)) + "+") + aN(dW, 6)) + "(delivery fee)")) | |
1220 | 1282 | else { | |
1221 | - | let | |
1222 | - | then [ScriptTransfer( | |
1283 | + | let az = if (((dn - do) > 0)) | |
1284 | + | then [ScriptTransfer(eo.caller, (dn - do), ag)] | |
1223 | 1285 | else nil | |
1224 | - | let | |
1225 | - | let | |
1226 | - | $Tuple2((( | |
1286 | + | let dX = (bC / 100) | |
1287 | + | let eD = valueOrElse(getInteger(aa), 0) | |
1288 | + | $Tuple2(((az :+ ScriptTransfer(aD, dX, ag)) :+ IntegerEntry(aa, (eD + dW))), $Tuple3(dL, er, ey)) | |
1227 | 1289 | } | |
1228 | 1290 | } | |
1229 | 1291 | } | |
1230 | 1292 | } | |
1231 | 1293 | } | |
1232 | 1294 | else throw("Strict value is not equal to itself.") | |
1233 | 1295 | } | |
1234 | 1296 | ||
1235 | 1297 | ||
1236 | 1298 | ||
1237 | - | @Callable( | |
1238 | - | func craftGoods ( | |
1239 | - | let | |
1240 | - | if (( | |
1241 | - | then if ((size( | |
1299 | + | @Callable(eo) | |
1300 | + | func craftGoods (ec,ed) = { | |
1301 | + | let er = bH() | |
1302 | + | if ((er == er)) | |
1303 | + | then if ((size(eo.payments) != 1)) | |
1242 | 1304 | then throw("exactly 1 payment must be attached") | |
1243 | 1305 | else { | |
1244 | - | let dk = dX.payments[0] | |
1245 | - | let dl = dk.amount | |
1246 | - | let eC = valueOrErrorMessage(dk.assetId, "WAVES can't be used as payment") | |
1247 | - | if ((eC != ae)) | |
1306 | + | let dm = eo.payments[0] | |
1307 | + | let dn = dm.amount | |
1308 | + | if (if (!(isDefined(dm.assetId))) | |
1309 | + | then true | |
1310 | + | else (value(dm.assetId) != ag)) | |
1248 | 1311 | then throw("USDT payments only!") | |
1249 | - | else if ((dl != aj)) | |
1250 | - | then throw("exactly 1 USDT must be attached as payment") | |
1251 | - | else if ((0 >= eB)) | |
1252 | - | then throw("Quantity should be positive") | |
1253 | - | else { | |
1254 | - | let T = valueOrErrorMessage(getString(aC, Q(toString(dX.caller))), "You don't have a duck staked") | |
1255 | - | let eb = split(valueOrElse(getString(aC, U(T)), g), "_") | |
1256 | - | if ((eb[J] != "M")) | |
1257 | - | then throw(("Duck location type should be Manufactory, but is " + eb[J])) | |
1258 | - | else { | |
1259 | - | let eD = eb[I] | |
1260 | - | let ec = bC(S(T)) | |
1261 | - | let cR = split(ec[G], "_") | |
1262 | - | if (if ((0 > eA)) | |
1263 | - | then true | |
1264 | - | else (eA >= size(s))) | |
1265 | - | then throw(("Unknown product idx=" + toString(eA))) | |
1266 | - | else { | |
1267 | - | let ab = split(s[eA], "_") | |
1268 | - | if ((size(ab) != v)) | |
1269 | - | then throw(("Fatal: unknown recipe: " + s[eA])) | |
1270 | - | else { | |
1271 | - | let eE = parseIntValue(ab[u]) | |
1272 | - | if ((q[eE] != eD)) | |
1273 | - | then throw(((("This product is available in " + q[eE]) + ", but you are in ") + eD)) | |
1274 | - | else { | |
1275 | - | let eF = if ((ec[H] == "")) | |
1276 | - | then nil | |
1277 | - | else split_4C(ec[H], "_") | |
1278 | - | func eG (bH,eH) = { | |
1279 | - | let aJ = bH._2 | |
1280 | - | let eI = if ((size(eF) > aJ)) | |
1281 | - | then eF[aJ] | |
1282 | - | else "0" | |
1283 | - | let dQ = parseIntValue(eI) | |
1284 | - | let bh = (eB * w) | |
1285 | - | let eJ = if ((aJ == eA)) | |
1286 | - | then toString((dQ + bh)) | |
1287 | - | else eI | |
1288 | - | $Tuple2((bH._1 :+ eJ), (aJ + 1)) | |
1289 | - | } | |
1290 | - | ||
1291 | - | let eK = ( let cl = s | |
1292 | - | let cm = size(cl) | |
1293 | - | let cn = $Tuple2(nil, 0) | |
1294 | - | func co (cp,cq) = if ((cq >= cm)) | |
1295 | - | then cp | |
1296 | - | else eG(cp, cl[cq]) | |
1297 | - | ||
1298 | - | func cr (cp,cq) = if ((cq >= cm)) | |
1299 | - | then cp | |
1300 | - | else throw("List size exceeds 50") | |
1301 | - | ||
1302 | - | cr(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(co(cn, 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 | |
1303 | - | func eL (bH,bJ) = { | |
1304 | - | let eM = (((parseIntValue(ab[bJ]) * ai) * eB) * parseIntValue(ab[t])) | |
1305 | - | let eN = parseIntValue(cR[bJ]) | |
1306 | - | if ((eM > eN)) | |
1307 | - | then throw(((((((("You have " + aL(eN, 8)) + " of ") + o[bJ]) + ", but recipe requires ") + aL(eM, 8)) + " for quantity ") + toString(eB))) | |
1308 | - | else if ((eM > 0)) | |
1309 | - | then $Tuple2((bH._1 :+ toString((eN - eM))), (bH._2 + eM)) | |
1310 | - | else $Tuple2((bH._1 :+ cR[bJ]), bH._2) | |
1311 | - | } | |
1312 | - | ||
1313 | - | let eO = { | |
1314 | - | let cl = an | |
1315 | - | let cm = size(cl) | |
1316 | - | let cn = $Tuple2(nil, 0) | |
1317 | - | func cs (cp,cq) = if ((cq >= cm)) | |
1318 | - | then cp | |
1319 | - | else eL(cp, cl[cq]) | |
1320 | - | ||
1321 | - | func ct (cp,cq) = if ((cq >= cm)) | |
1322 | - | then cp | |
1323 | - | else throw("List size exceeds 6") | |
1324 | - | ||
1325 | - | ct(cs(cs(cs(cs(cs(cs(cn, 0), 1), 2), 3), 4), 5), 6) | |
1326 | - | } | |
1327 | - | let ef = makeString([ec[E], ec[F], makeString(eO._1, "_"), makeString_2C(eK, "_")], ":") | |
1328 | - | let eP = aF(invoke(aC, "updateBackpack", [T, ef], nil)) | |
1329 | - | let eh = aI(invoke(aC, "updateDuckStats", [T, fraction(b, eO._2, ak)], nil)) | |
1330 | - | $Tuple2(nil, $Tuple3(eP, ea, eh)) | |
1331 | - | } | |
1332 | - | } | |
1333 | - | } | |
1334 | - | } | |
1335 | - | } | |
1312 | + | else if ((dn != al)) | |
1313 | + | then throw((("exactly " + aN(m, 6)) + " USDT must be attached as payment")) | |
1314 | + | else { | |
1315 | + | let V = valueOrErrorMessage(getString(aE, S(toString(eo.caller))), "You don't have a duck staked") | |
1316 | + | let es = split(valueOrElse(getString(aE, W(V)), g), "_") | |
1317 | + | if ((es[L] != "M")) | |
1318 | + | then throw(("Duck location type should be Manufactory, but is " + es[L])) | |
1319 | + | else { | |
1320 | + | let eR = es[K] | |
1321 | + | let et = bE(U(V)) | |
1322 | + | let cT = split(et[I], "_") | |
1323 | + | let ea = if ((et[J] == "")) | |
1324 | + | then nil | |
1325 | + | else split_4C(et[J], "_") | |
1326 | + | let eS = dZ(cT, ea, eR, ec, ed) | |
1327 | + | let eJ = eS._1 | |
1328 | + | let ej = eS._2 | |
1329 | + | let eT = eS._3 | |
1330 | + | let ew = makeString([et[G], et[H], makeString(eJ, "_"), makeString_2C(ej, "_")], ":") | |
1331 | + | let eU = aH(invoke(aE, "updateBackpack", [V, ew], nil)) | |
1332 | + | let ey = aK(invoke(aE, "updateDuckStats", [V, fraction(b, eT, am)], nil)) | |
1333 | + | $Tuple2(nil, $Tuple3(eU, er, ey)) | |
1334 | + | } | |
1335 | + | } | |
1336 | 1336 | } | |
1337 | 1337 | else throw("Strict value is not equal to itself.") | |
1338 | 1338 | } | |
1339 | 1339 | ||
1340 | 1340 | ||
1341 | 1341 | ||
1342 | - | @Callable(dX) | |
1343 | - | func setWarehouseOrder (eQ,W) = { | |
1344 | - | let en = dX.originCaller | |
1345 | - | let P = toString(en) | |
1346 | - | let eP = if ((en != aB)) | |
1347 | - | then bE() | |
1348 | - | else false | |
1349 | - | let eo = value(assetInfo(fromBase58String(W))) | |
1350 | - | if (!(isDefined(getInteger(aC, N(W))))) | |
1351 | - | then throw((("NFT " + eo.name) + " is not staked")) | |
1352 | - | else { | |
1353 | - | let ep = valueOrErrorMessage(getString(aC, L(W)), (("NFT " + eo.name) + " is orphaned")) | |
1354 | - | if (if ((en != aB)) | |
1355 | - | then (ep != P) | |
1356 | - | else false) | |
1357 | - | then throw((e + " is not yours")) | |
1358 | - | else { | |
1359 | - | let eR = split_4C(eQ, ":") | |
1360 | - | let dz = aF(invoke(aC, "getWarehouseREADONLY", [W], nil)) | |
1361 | - | let bY = split_4C(dz, ":") | |
1362 | - | let eS = split(bY[B], "_") | |
1363 | - | let eT = parseIntValue(eS[D]) | |
1364 | - | let be = V(W) | |
1365 | - | let bZ = bd(be) | |
1366 | - | let dY = bX(bY, bZ, eR) | |
1367 | - | let eU = dY._4 | |
1368 | - | let eV = dY._5 | |
1369 | - | let eW = dY._7 | |
1370 | - | let eX = (eU + eV) | |
1371 | - | let eY = ((eT - eW) - eX) | |
1372 | - | if ((0 > eY)) | |
1373 | - | then throw((((((("Attempt to reserve " + toString(eU)) + " space for buy orders, and ") + toString(eV)) + " space for sell orders (and occupied=") + toString(eW)) + "), leads to negative free space")) | |
1374 | - | else { | |
1375 | - | let dH = makeString_2C([bY[x], makeString(dY._1, "_"), makeString(dY._2, "_"), makeString_2C(dY._3, "_"), toString(eX)], ":") | |
1376 | - | let dJ = aF(invoke(aC, "saveWarehouse", [dH, W], nil)) | |
1377 | - | let eZ = dY._6 | |
1378 | - | let fa = if ((eZ > 0)) | |
1379 | - | then if ((size(dX.payments) != 1)) | |
1380 | - | then throw("exactly 1 payment must be attached") | |
1381 | - | else { | |
1382 | - | let dk = dX.payments[0] | |
1383 | - | let dl = dk.amount | |
1384 | - | let eC = valueOrErrorMessage(dk.assetId, "WAVES can't be used as payment") | |
1385 | - | if ((eC != ae)) | |
1386 | - | then throw("USDT payments only!") | |
1387 | - | else if ((dl != eZ)) | |
1388 | - | then throw(("Payment needed is " + toString(eZ))) | |
1389 | - | else [StringEntry(be, eQ)] | |
1390 | - | } | |
1391 | - | else if ((eZ == 0)) | |
1392 | - | then if ((size(dX.payments) != 0)) | |
1393 | - | then throw("No payments needed") | |
1394 | - | else [StringEntry(be, eQ)] | |
1395 | - | else if ((size(dX.payments) != 0)) | |
1396 | - | then throw("No payments needed") | |
1397 | - | else [ScriptTransfer(addressFromStringValue(ep), -(eZ), ae), StringEntry(be, eQ)] | |
1398 | - | $Tuple2(fa, $Tuple2(eP, dJ)) | |
1399 | - | } | |
1400 | - | } | |
1401 | - | } | |
1402 | - | } | |
1403 | - | ||
1404 | - | ||
1405 | - | ||
1406 | - | @Callable(dX) | |
1407 | - | func acceptWarehouseOrder (dq,dp,T) = { | |
1408 | - | let ea = bF() | |
1409 | - | if ((ea == ea)) | |
1410 | - | then { | |
1411 | - | let de = dX.originCaller | |
1412 | - | let cZ = toString(de) | |
1413 | - | let fb = valueOrErrorMessage(getString(aC, Q(cZ)), "You don't have a duck staked") | |
1414 | - | let eb = valueOrElse(getString(aC, U(fb)), g) | |
1415 | - | let fc = split(value(eb), "_") | |
1416 | - | if ((fc[J] != "L")) | |
1417 | - | then throw((("Duck location type is " + fc[J]) + ", but should be L")) | |
1418 | - | else if ((fb != T)) | |
1419 | - | then throw(((("Your staked duck is " + fb) + ", but passed ") + T)) | |
1420 | - | else { | |
1421 | - | let bD = S(T) | |
1422 | - | let ec = bC(bD) | |
1423 | - | let dr = split(ec[F], "_") | |
1424 | - | let ds = split(ec[G], "_") | |
1425 | - | let dt = if ((ec[H] == "")) | |
1426 | - | then nil | |
1427 | - | else split_4C(ec[H], "_") | |
1428 | - | let fd = do(dp, cZ, dq, dr, ds, dt) | |
1429 | - | let fe = fd._1 | |
1430 | - | let ff = fd._2 | |
1431 | - | let fg = fd._3 | |
1432 | - | let fh = fd._4 | |
1433 | - | let cY = fd._5 | |
1434 | - | let dg = fd._6 | |
1435 | - | let fi = fd._7 | |
1436 | - | let di = fd._8 | |
1437 | - | let fj = fd._9 | |
1438 | - | let dK = fd._10 | |
1439 | - | let fk = [fe, cX(cY, cZ, 0)] | |
1440 | - | let fl = df(dg, dX.payments, di, 0) | |
1441 | - | let fm = makeString_2C([ec[E], makeString(ff, "_"), makeString(fg, "_"), makeString_2C(fh, "_")], ":") | |
1442 | - | let fn = aF(invoke(aC, "updateBackpack", [T, fm], nil)) | |
1443 | - | let fo = aI(invoke(aC, "updateDuckStats", [T, fraction(d, fi, ak)], nil)) | |
1444 | - | $Tuple2((fk ++ fl), $Tuple5(ea, fj, fn, fo, dK)) | |
1445 | - | } | |
1446 | - | } | |
1447 | - | else throw("Strict value is not equal to itself.") | |
1448 | - | } | |
1449 | - | ||
1450 | - | ||
1451 | - | ||
1452 | - | @Callable(dX) | |
1453 | - | func acceptShopOrderDuckDelivery (fp,dp) = if (!(ac)) | |
1342 | + | @Callable(eo) | |
1343 | + | func craftGoodsDuckDelivery (ec,ed,eb) = if (!(ae)) | |
1454 | 1344 | then throw("Delivery feature is turned off!") | |
1455 | 1345 | else { | |
1456 | - | let | |
1457 | - | if (( | |
1346 | + | let er = bH() | |
1347 | + | if ((er == er)) | |
1458 | 1348 | then { | |
1459 | - | let de = dX.originCaller | |
1460 | - | let cZ = toString(de) | |
1461 | - | let T = valueOrErrorMessage(getString(aC, Q(cZ)), "You don't have a duck staked") | |
1462 | - | let bD = S(T) | |
1463 | - | let ec = bC(bD) | |
1464 | - | let dr = split(ec[F], "_") | |
1465 | - | let ds = split(ec[G], "_") | |
1466 | - | let dt = if ((ec[H] == "")) | |
1467 | - | then nil | |
1468 | - | else split_4C(ec[H], "_") | |
1469 | - | let fq = do(dp, cZ, fp, dr, ds, dt) | |
1470 | - | let fe = fq._1 | |
1471 | - | let ff = fq._2 | |
1472 | - | let fg = fq._3 | |
1473 | - | let fh = fq._4 | |
1474 | - | let cY = fq._5 | |
1475 | - | let dg = fq._6 | |
1476 | - | let fi = fq._7 | |
1477 | - | let di = fq._8 | |
1478 | - | let fj = fq._9 | |
1479 | - | let dK = fq._10 | |
1480 | - | let fr = fraction((dg + cY), aV, aj) | |
1481 | - | let fs = if ((k > fr)) | |
1482 | - | then k | |
1483 | - | else fr | |
1484 | - | let dj = fraction(fs, dg, (dg + cY)) | |
1485 | - | let da = (fs - dj) | |
1486 | - | let em = valueOrElse(getInteger(Y), 0) | |
1487 | - | let fk = [fe, cX(cY, cZ, da)] | |
1488 | - | let fl = df(dg, dX.payments, di, dj) | |
1489 | - | let fm = makeString_2C([ec[E], makeString(ff, "_"), makeString(fg, "_"), makeString_2C(fh, "_")], ":") | |
1490 | - | let fn = aF(invoke(aC, "updateBackpack", [T, fm], nil)) | |
1491 | - | let fo = aI(invoke(aC, "updateDuckStats", [T, fraction(d, fi, ak)], nil)) | |
1492 | - | $Tuple2(((fk ++ fl) :+ IntegerEntry(Y, (em + fs))), $Tuple5(ea, fj, fn, fo, dK)) | |
1493 | - | } | |
1494 | - | else throw("Strict value is not equal to itself.") | |
1495 | - | } | |
1496 | - | ||
1497 | - | ||
1498 | - | ||
1499 | - | @Callable(dX) | |
1500 | - | func acceptShopOrderLandDelivery (fp,dp,ft) = if (!(ac)) | |
1501 | - | then throw("Delivery feature is turned off!") | |
1502 | - | else { | |
1503 | - | let ea = bF() | |
1504 | - | if ((ea == ea)) | |
1505 | - | then { | |
1506 | - | let de = dX.originCaller | |
1507 | - | let cZ = toString(de) | |
1508 | - | let eo = value(assetInfo(fromBase58String(ft))) | |
1509 | - | if (!(isDefined(getInteger(aC, N(ft))))) | |
1510 | - | then throw((("NFT " + eo.name) + " is not staked")) | |
1349 | + | let V = valueOrErrorMessage(getString(aE, S(toString(eo.caller))), "You don't have a duck staked") | |
1350 | + | if ((size(eo.payments) != 1)) | |
1351 | + | then throw("exactly 1 payment must be attached") | |
1511 | 1352 | else { | |
1512 | - | let ep = valueOrErrorMessage(getString(aC, L(ft)), (("NFT " + eo.name) + " is orphaned")) | |
1513 | - | if ((ep != cZ)) | |
1514 | - | then throw((e + " is not yours")) | |
1353 | + | let dm = eo.payments[0] | |
1354 | + | let dn = dm.amount | |
1355 | + | if (if (!(isDefined(dm.assetId))) | |
1356 | + | then true | |
1357 | + | else (value(dm.assetId) != ag)) | |
1358 | + | then throw("USDT payments only!") | |
1515 | 1359 | else { | |
1516 | - | let dz = aF(invoke(aC, "getWarehouseREADONLY", [ft], nil)) | |
1517 | - | let bY = split_4C(dz, ":") | |
1518 | - | let cK = split(bY[y], "_") | |
1519 | - | let cR = split(bY[z], "_") | |
1520 | - | let eF = if ((bY[A] == "")) | |
1360 | + | let et = bE(U(V)) | |
1361 | + | let cT = split(et[I], "_") | |
1362 | + | let ea = if ((et[J] == "")) | |
1521 | 1363 | then nil | |
1522 | - | else split(bY[A], "_") | |
1523 | - | let fu = do(dp, cZ, fp, cK, cR, eF) | |
1524 | - | let fe = fu._1 | |
1525 | - | let ff = fu._2 | |
1526 | - | let fg = fu._3 | |
1527 | - | let fh = fu._4 | |
1528 | - | let cY = fu._5 | |
1529 | - | let dg = fu._6 | |
1530 | - | let fi = fu._7 | |
1531 | - | let di = fu._8 | |
1532 | - | let fj = fu._9 | |
1533 | - | let dK = fu._10 | |
1534 | - | let fr = fraction((dg + cY), aV, aj) | |
1535 | - | let fs = if ((k > fr)) | |
1536 | - | then k | |
1537 | - | else fr | |
1538 | - | let dj = fraction(fs, dg, (dg + cY)) | |
1539 | - | let da = (fs - dj) | |
1540 | - | let em = valueOrElse(getInteger(Y), 0) | |
1541 | - | let fk = [fe, cX(cY, cZ, da)] | |
1542 | - | let fl = df(dg, dX.payments, di, dj) | |
1543 | - | let dH = makeString_2C([bY[x], makeString(ff, "_"), makeString(fg, "_"), makeString(fh, "_"), bY[B]], ":") | |
1544 | - | let dJ = aF(invoke(aC, "saveWarehouse", [dH, ft], nil)) | |
1545 | - | let eh = aI(invoke(aC, "updateAccStats", [cZ, fraction(d, fi, ak)], nil)) | |
1546 | - | $Tuple2(((fk ++ fl) :+ IntegerEntry(Y, (em + fs))), $Tuple5(ea, fj, dJ, eh, dK)) | |
1364 | + | else split_4C(et[J], "_") | |
1365 | + | let eV = dZ(cT, ea, eb, ec, ed) | |
1366 | + | let eJ = eV._1 | |
1367 | + | let ej = eV._2 | |
1368 | + | let eT = eV._3 | |
1369 | + | let ew = makeString([et[G], et[H], makeString(eJ, "_"), makeString_2C(ej, "_")], ":") | |
1370 | + | let ex = aH(invoke(aE, "updateBackpack", [V, ew], nil)) | |
1371 | + | let ey = aK(invoke(aE, "updateDuckStats", [V, fraction(b, eT, am)], nil)) | |
1372 | + | let eC = fraction(ed, k, n) | |
1373 | + | let dW = max([eC, k]) | |
1374 | + | let do = (m + dW) | |
1375 | + | if ((do > dn)) | |
1376 | + | then throw((((((("Insufficient payment! Attached=" + aN(dn, 6)) + ", required=") + aN(m, 6)) + "+") + aN(dW, 6)) + "(delivery fee)")) | |
1377 | + | else { | |
1378 | + | let az = if (((dn - do) > 0)) | |
1379 | + | then [ScriptTransfer(eo.caller, (dn - do), ag)] | |
1380 | + | else nil | |
1381 | + | let eD = valueOrElse(getInteger(aa), 0) | |
1382 | + | $Tuple2((az :+ IntegerEntry(aa, (eD + dW))), $Tuple3(ex, er, ey)) | |
1383 | + | } | |
1547 | 1384 | } | |
1548 | 1385 | } | |
1549 | 1386 | } | |
1550 | 1387 | else throw("Strict value is not equal to itself.") | |
1551 | 1388 | } | |
1552 | 1389 | ||
1553 | 1390 | ||
1554 | 1391 | ||
1555 | - | @Callable(dX) | |
1556 | - | func sellProductsToES (cM) = { | |
1557 | - | let ea = bF() | |
1558 | - | if ((ea == ea)) | |
1559 | - | then if ((size(dX.payments) != 0)) | |
1392 | + | @Callable(eo) | |
1393 | + | func craftGoodsLandDelivery (ec,ed,Y,eb) = if (!(ae)) | |
1394 | + | then throw("Delivery feature is turned off!") | |
1395 | + | else { | |
1396 | + | let er = bH() | |
1397 | + | if ((er == er)) | |
1398 | + | then if ((size(eo.payments) != 1)) | |
1399 | + | then throw("exactly 1 payment must be attached") | |
1400 | + | else { | |
1401 | + | let dm = eo.payments[0] | |
1402 | + | let dn = dm.amount | |
1403 | + | if (if (!(isDefined(dm.assetId))) | |
1404 | + | then true | |
1405 | + | else (value(dm.assetId) != ag)) | |
1406 | + | then throw("USDT payments only!") | |
1407 | + | else { | |
1408 | + | let eE = eo.caller | |
1409 | + | let R = toString(eE) | |
1410 | + | let eF = value(assetInfo(fromBase58String(Y))) | |
1411 | + | if (!(isDefined(getInteger(aE, P(Y))))) | |
1412 | + | then throw((("NFT " + eF.name) + " is not staked")) | |
1413 | + | else { | |
1414 | + | let eG = valueOrErrorMessage(getString(aE, N(Y)), (("NFT " + eF.name) + " is orphaned")) | |
1415 | + | if ((eG != R)) | |
1416 | + | then throw((e + " is not yours")) | |
1417 | + | else { | |
1418 | + | let dB = aH(invoke(aE, "getWarehouseREADONLY", [Y], nil)) | |
1419 | + | let ca = split_4C(dB, ":") | |
1420 | + | let cT = split(ca[B], "_") | |
1421 | + | let ea = if ((ca[C] == "")) | |
1422 | + | then nil | |
1423 | + | else split_4C(ca[C], "_") | |
1424 | + | let eW = dZ(cT, ea, eb, ec, ed) | |
1425 | + | let eJ = eW._1 | |
1426 | + | let ej = eW._2 | |
1427 | + | let eT = eW._3 | |
1428 | + | let dJ = makeString_2C([ca[z], ca[A], makeString(eJ, "_"), makeString_2C(ej, "_"), ca[D]], ":") | |
1429 | + | let dL = aH(invoke(aE, "saveWarehouse", [dJ, Y], nil)) | |
1430 | + | let ey = aK(invoke(aE, "updateAccStats", [R, fraction(b, eT, am)], nil)) | |
1431 | + | let eC = fraction(ed, k, n) | |
1432 | + | let dW = max([eC, k]) | |
1433 | + | let do = (m + dW) | |
1434 | + | if ((do > dn)) | |
1435 | + | then throw((((((("Insufficient payment! Attached=" + aN(dn, 6)) + ", required=") + aN(m, 6)) + "+") + aN(dW, 6)) + "(delivery fee)")) | |
1436 | + | else { | |
1437 | + | let az = if (((dn - do) > 0)) | |
1438 | + | then [ScriptTransfer(eo.caller, (dn - do), ag)] | |
1439 | + | else nil | |
1440 | + | let eD = valueOrElse(getInteger(aa), 0) | |
1441 | + | $Tuple2((az :+ IntegerEntry(aa, (eD + dW))), $Tuple3(dL, er, ey)) | |
1442 | + | } | |
1443 | + | } | |
1444 | + | } | |
1445 | + | } | |
1446 | + | } | |
1447 | + | else throw("Strict value is not equal to itself.") | |
1448 | + | } | |
1449 | + | ||
1450 | + | ||
1451 | + | ||
1452 | + | @Callable(eo) | |
1453 | + | func setWarehouseOrder (eX,Y) = { | |
1454 | + | let eE = eo.originCaller | |
1455 | + | let R = toString(eE) | |
1456 | + | let eU = if ((eE != aD)) | |
1457 | + | then bG() | |
1458 | + | else false | |
1459 | + | let eF = value(assetInfo(fromBase58String(Y))) | |
1460 | + | if (!(isDefined(getInteger(aE, P(Y))))) | |
1461 | + | then throw((("NFT " + eF.name) + " is not staked")) | |
1462 | + | else { | |
1463 | + | let eG = valueOrErrorMessage(getString(aE, N(Y)), (("NFT " + eF.name) + " is orphaned")) | |
1464 | + | if (if ((eE != aD)) | |
1465 | + | then (eG != R) | |
1466 | + | else false) | |
1467 | + | then throw((e + " is not yours")) | |
1468 | + | else { | |
1469 | + | let eY = split_4C(eX, ":") | |
1470 | + | let dB = aH(invoke(aE, "getWarehouseREADONLY", [Y], nil)) | |
1471 | + | let ca = split_4C(dB, ":") | |
1472 | + | let eZ = split(ca[D], "_") | |
1473 | + | let fa = parseIntValue(eZ[F]) | |
1474 | + | let bg = X(Y) | |
1475 | + | let cb = bf(bg) | |
1476 | + | let ep = bZ(ca, cb, eY) | |
1477 | + | let fb = ep._4 | |
1478 | + | let fc = ep._5 | |
1479 | + | let fd = ep._7 | |
1480 | + | let fe = (fb + fc) | |
1481 | + | let ff = ((fa - fd) - fe) | |
1482 | + | if ((0 > ff)) | |
1483 | + | then throw((((((("Attempt to reserve " + toString(fb)) + " space for buy orders, and ") + toString(fc)) + " space for sell orders (and occupied=") + toString(fd)) + "), leads to negative free space")) | |
1484 | + | else { | |
1485 | + | let dJ = makeString_2C([ca[z], makeString(ep._1, "_"), makeString(ep._2, "_"), makeString_2C(ep._3, "_"), toString(fe)], ":") | |
1486 | + | let dL = aH(invoke(aE, "saveWarehouse", [dJ, Y], nil)) | |
1487 | + | let fg = ep._6 | |
1488 | + | let fh = if ((fg > 0)) | |
1489 | + | then if ((size(eo.payments) != 1)) | |
1490 | + | then throw("exactly 1 payment must be attached") | |
1491 | + | else { | |
1492 | + | let dm = eo.payments[0] | |
1493 | + | let dn = dm.amount | |
1494 | + | let fi = valueOrErrorMessage(dm.assetId, "WAVES can't be used as payment") | |
1495 | + | if ((fi != ag)) | |
1496 | + | then throw("USDT payments only!") | |
1497 | + | else if ((dn != fg)) | |
1498 | + | then throw(("Payment needed is " + toString(fg))) | |
1499 | + | else [StringEntry(bg, eX)] | |
1500 | + | } | |
1501 | + | else if ((fg == 0)) | |
1502 | + | then if ((size(eo.payments) != 0)) | |
1503 | + | then throw("No payments needed") | |
1504 | + | else [StringEntry(bg, eX)] | |
1505 | + | else if ((size(eo.payments) != 0)) | |
1506 | + | then throw("No payments needed") | |
1507 | + | else [ScriptTransfer(addressFromStringValue(eG), -(fg), ag), StringEntry(bg, eX)] | |
1508 | + | $Tuple2(fh, $Tuple2(eU, dL)) | |
1509 | + | } | |
1510 | + | } | |
1511 | + | } | |
1512 | + | } | |
1513 | + | ||
1514 | + | ||
1515 | + | ||
1516 | + | @Callable(eo) | |
1517 | + | func acceptWarehouseOrder (ds,dr,V) = { | |
1518 | + | let er = bH() | |
1519 | + | if ((er == er)) | |
1520 | + | then { | |
1521 | + | let dg = eo.originCaller | |
1522 | + | let db = toString(dg) | |
1523 | + | let fj = valueOrErrorMessage(getString(aE, S(db)), "You don't have a duck staked") | |
1524 | + | let es = valueOrElse(getString(aE, W(fj)), g) | |
1525 | + | let fk = split(value(es), "_") | |
1526 | + | if ((fk[L] != "L")) | |
1527 | + | then throw((("Duck location type is " + fk[L]) + ", but should be L")) | |
1528 | + | else if ((fj != V)) | |
1529 | + | then throw(((("Your staked duck is " + fj) + ", but passed ") + V)) | |
1530 | + | else { | |
1531 | + | let bF = U(V) | |
1532 | + | let et = bE(bF) | |
1533 | + | let dt = split(et[H], "_") | |
1534 | + | let du = split(et[I], "_") | |
1535 | + | let dv = if ((et[J] == "")) | |
1536 | + | then nil | |
1537 | + | else split_4C(et[J], "_") | |
1538 | + | let fl = dq(dr, db, ds, dt, du, dv) | |
1539 | + | let fm = fl._1 | |
1540 | + | let fn = fl._2 | |
1541 | + | let fo = fl._3 | |
1542 | + | let fp = fl._4 | |
1543 | + | let da = fl._5 | |
1544 | + | let di = fl._6 | |
1545 | + | let fq = fl._7 | |
1546 | + | let dk = fl._8 | |
1547 | + | let fr = fl._9 | |
1548 | + | let dM = fl._10 | |
1549 | + | let fs = [fm, cZ(da, db, 0)] | |
1550 | + | let ft = dh(di, eo.payments, dk, 0) | |
1551 | + | let fu = makeString_2C([et[G], makeString(fn, "_"), makeString(fo, "_"), makeString_2C(fp, "_")], ":") | |
1552 | + | let fv = aH(invoke(aE, "updateBackpack", [V, fu], nil)) | |
1553 | + | let fw = aK(invoke(aE, "updateDuckStats", [V, fraction(d, fq, am)], nil)) | |
1554 | + | $Tuple2((fs ++ ft), $Tuple5(er, fr, fv, fw, dM)) | |
1555 | + | } | |
1556 | + | } | |
1557 | + | else throw("Strict value is not equal to itself.") | |
1558 | + | } | |
1559 | + | ||
1560 | + | ||
1561 | + | ||
1562 | + | @Callable(eo) | |
1563 | + | func acceptShopOrderDuckDelivery (fx,dr) = if (!(ae)) | |
1564 | + | then throw("Delivery feature is turned off!") | |
1565 | + | else { | |
1566 | + | let er = bH() | |
1567 | + | if ((er == er)) | |
1568 | + | then { | |
1569 | + | let dg = eo.originCaller | |
1570 | + | let db = toString(dg) | |
1571 | + | let V = valueOrErrorMessage(getString(aE, S(db)), "You don't have a duck staked") | |
1572 | + | let bF = U(V) | |
1573 | + | let et = bE(bF) | |
1574 | + | let dt = split(et[H], "_") | |
1575 | + | let du = split(et[I], "_") | |
1576 | + | let dv = if ((et[J] == "")) | |
1577 | + | then nil | |
1578 | + | else split_4C(et[J], "_") | |
1579 | + | let fy = dq(dr, db, fx, dt, du, dv) | |
1580 | + | let fm = fy._1 | |
1581 | + | let fn = fy._2 | |
1582 | + | let fo = fy._3 | |
1583 | + | let fp = fy._4 | |
1584 | + | let da = fy._5 | |
1585 | + | let di = fy._6 | |
1586 | + | let fq = fy._7 | |
1587 | + | let dk = fy._8 | |
1588 | + | let fr = fy._9 | |
1589 | + | let dM = fy._10 | |
1590 | + | let fz = fraction((di + da), aX, al) | |
1591 | + | let fA = max([fz, k]) | |
1592 | + | let dl = fraction(fA, di, (di + da)) | |
1593 | + | let dc = (fA - dl) | |
1594 | + | let eD = valueOrElse(getInteger(aa), 0) | |
1595 | + | let fs = [fm, cZ(da, db, dc)] | |
1596 | + | let ft = dh(di, eo.payments, dk, dl) | |
1597 | + | let fu = makeString_2C([et[G], makeString(fn, "_"), makeString(fo, "_"), makeString_2C(fp, "_")], ":") | |
1598 | + | let fv = aH(invoke(aE, "updateBackpack", [V, fu], nil)) | |
1599 | + | let fw = aK(invoke(aE, "updateDuckStats", [V, fraction(d, fq, am)], nil)) | |
1600 | + | $Tuple2(((fs ++ ft) :+ IntegerEntry(aa, (eD + fA))), $Tuple5(er, fr, fv, fw, dM)) | |
1601 | + | } | |
1602 | + | else throw("Strict value is not equal to itself.") | |
1603 | + | } | |
1604 | + | ||
1605 | + | ||
1606 | + | ||
1607 | + | @Callable(eo) | |
1608 | + | func acceptShopOrderLandDelivery (fx,dr,fB) = if (!(ae)) | |
1609 | + | then throw("Delivery feature is turned off!") | |
1610 | + | else { | |
1611 | + | let er = bH() | |
1612 | + | if ((er == er)) | |
1613 | + | then { | |
1614 | + | let dg = eo.originCaller | |
1615 | + | let db = toString(dg) | |
1616 | + | let eF = value(assetInfo(fromBase58String(fB))) | |
1617 | + | if (!(isDefined(getInteger(aE, P(fB))))) | |
1618 | + | then throw((("NFT " + eF.name) + " is not staked")) | |
1619 | + | else { | |
1620 | + | let eG = valueOrErrorMessage(getString(aE, N(fB)), (("NFT " + eF.name) + " is orphaned")) | |
1621 | + | if ((eG != db)) | |
1622 | + | then throw((e + " is not yours")) | |
1623 | + | else { | |
1624 | + | let dB = aH(invoke(aE, "getWarehouseREADONLY", [fB], nil)) | |
1625 | + | let ca = split_4C(dB, ":") | |
1626 | + | let cM = split(ca[A], "_") | |
1627 | + | let cT = split(ca[B], "_") | |
1628 | + | let ea = if ((ca[C] == "")) | |
1629 | + | then nil | |
1630 | + | else split_4C(ca[C], "_") | |
1631 | + | let fC = dq(dr, db, fx, cM, cT, ea) | |
1632 | + | let fm = fC._1 | |
1633 | + | let fn = fC._2 | |
1634 | + | let fo = fC._3 | |
1635 | + | let fp = fC._4 | |
1636 | + | let da = fC._5 | |
1637 | + | let di = fC._6 | |
1638 | + | let fq = fC._7 | |
1639 | + | let dk = fC._8 | |
1640 | + | let fr = fC._9 | |
1641 | + | let dM = fC._10 | |
1642 | + | let fz = fraction((di + da), aX, al) | |
1643 | + | let fA = max([fz, k]) | |
1644 | + | let dl = fraction(fA, di, (di + da)) | |
1645 | + | let dc = (fA - dl) | |
1646 | + | let eD = valueOrElse(getInteger(aa), 0) | |
1647 | + | let fs = [fm, cZ(da, db, dc)] | |
1648 | + | let ft = dh(di, eo.payments, dk, dl) | |
1649 | + | let dJ = makeString_2C([ca[z], makeString(fn, "_"), makeString(fo, "_"), makeString(fp, "_"), ca[D]], ":") | |
1650 | + | let dL = aH(invoke(aE, "saveWarehouse", [dJ, fB], nil)) | |
1651 | + | let ey = aK(invoke(aE, "updateAccStats", [db, fraction(d, fq, am)], nil)) | |
1652 | + | $Tuple2(((fs ++ ft) :+ IntegerEntry(aa, (eD + fA))), $Tuple5(er, fr, dL, ey, dM)) | |
1653 | + | } | |
1654 | + | } | |
1655 | + | } | |
1656 | + | else throw("Strict value is not equal to itself.") | |
1657 | + | } | |
1658 | + | ||
1659 | + | ||
1660 | + | ||
1661 | + | @Callable(eo) | |
1662 | + | func sellProductsToES (cO) = { | |
1663 | + | let er = bH() | |
1664 | + | if ((er == er)) | |
1665 | + | then if ((size(eo.payments) != 0)) | |
1560 | 1666 | then throw("No payments needed") | |
1561 | 1667 | else { | |
1562 | - | let | |
1563 | - | let | |
1564 | - | if (( | |
1565 | - | then throw(("Duck location type should be Airport, but is " + | |
1668 | + | let V = valueOrErrorMessage(getString(aE, S(toString(eo.caller))), "You don't have a duck staked") | |
1669 | + | let es = split(valueOrElse(getString(aE, W(V)), g), "_") | |
1670 | + | if ((es[L] != "A")) | |
1671 | + | then throw(("Duck location type should be Airport, but is " + es[L])) | |
1566 | 1672 | else { | |
1567 | - | let | |
1568 | - | let | |
1673 | + | let et = bE(U(V)) | |
1674 | + | let ea = if ((et[J] == "")) | |
1569 | 1675 | then nil | |
1570 | - | else split_4C( | |
1571 | - | let | |
1572 | - | let | |
1573 | - | let | |
1574 | - | then split_4C(value( | |
1676 | + | else split_4C(et[J], "_") | |
1677 | + | let fD = Z() | |
1678 | + | let fE = getString(fD) | |
1679 | + | let fF = if (isDefined(fE)) | |
1680 | + | then split_4C(value(fE), "_") | |
1575 | 1681 | else nil | |
1576 | - | func | |
1577 | - | let | |
1578 | - | let | |
1579 | - | then | |
1682 | + | func fG (bJ,fH) = { | |
1683 | + | let bL = bJ._1 | |
1684 | + | let ed = if ((size(cO) > bL)) | |
1685 | + | then cO[bL] | |
1580 | 1686 | else 0 | |
1581 | - | if ((0 > | |
1687 | + | if ((0 > ed)) | |
1582 | 1688 | then throw("Quantity cannot be negative") | |
1583 | 1689 | else { | |
1584 | - | let | |
1585 | - | if ((size( | |
1586 | - | then throw(("Fatal: unknown recipe: " + | |
1690 | + | let ad = split(fH, "_") | |
1691 | + | if ((size(ad) != x)) | |
1692 | + | then throw(("Fatal: unknown recipe: " + fH)) | |
1587 | 1693 | else { | |
1588 | - | let | |
1589 | - | let | |
1590 | - | then parseIntValue( | |
1694 | + | let fI = (i * y) | |
1695 | + | let fJ = if ((size(fF) > bL)) | |
1696 | + | then parseIntValue(fF[bL]) | |
1591 | 1697 | else 0 | |
1592 | - | let | |
1593 | - | if (( | |
1594 | - | then throw(((("Warehouse can buy only " + toString( | |
1698 | + | let fK = (fI - fJ) | |
1699 | + | if ((ed > fK)) | |
1700 | + | then throw(((("Warehouse can buy only " + toString(fK)) + " of ") + r[bL])) | |
1595 | 1701 | else { | |
1596 | - | let | |
1597 | - | let | |
1598 | - | let | |
1599 | - | then parseIntValue( | |
1702 | + | let eK = ac(ad) | |
1703 | + | let fL = fraction((eK * j), h, (am * y)) | |
1704 | + | let fM = if ((size(ea) > bL)) | |
1705 | + | then parseIntValue(ea[bL]) | |
1600 | 1706 | else 0 | |
1601 | - | if (( | |
1602 | - | then throw(((("You have only " + toString( | |
1603 | - | else $Tuple5(( | |
1707 | + | if ((ed > fM)) | |
1708 | + | then throw(((("You have only " + toString(fM)) + " of ") + r[bL])) | |
1709 | + | else $Tuple5((bL + 1), (bJ._2 + (fL * ed)), (bJ._3 :+ toString((fM - ed))), (bJ._4 :+ toString((fJ + ed))), (bJ._5 + (eK * ed))) | |
1604 | 1710 | } | |
1605 | 1711 | } | |
1606 | 1712 | } | |
1607 | 1713 | } | |
1608 | 1714 | ||
1609 | - | let | |
1610 | - | let | |
1611 | - | let | |
1612 | - | let | |
1613 | - | func | |
1614 | - | then | |
1615 | - | else | |
1715 | + | let en = { | |
1716 | + | let cn = u | |
1717 | + | let co = size(cn) | |
1718 | + | let cp = $Tuple5(0, 0, nil, nil, 0) | |
1719 | + | func cq (cr,cs) = if ((cs >= co)) | |
1720 | + | then cr | |
1721 | + | else fG(cr, cn[cs]) | |
1616 | 1722 | ||
1617 | - | func | |
1618 | - | then | |
1723 | + | func ct (cr,cs) = if ((cs >= co)) | |
1724 | + | then cr | |
1619 | 1725 | else throw("List size exceeds 50") | |
1620 | 1726 | ||
1621 | - | | |
1727 | + | ct(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cq(cp, 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) | |
1622 | 1728 | } | |
1623 | - | let | |
1624 | - | let | |
1625 | - | let | |
1626 | - | $Tuple2([StringEntry( | |
1729 | + | let fu = makeString_2C([et[G], et[H], et[I], makeString_2C(en._3, "_")], ":") | |
1730 | + | let fv = aH(invoke(aE, "updateBackpack", [V, fu], nil)) | |
1731 | + | let ey = aK(invoke(aE, "updateDuckStats", [V, fraction(c, en._5, (am * 10))], nil)) | |
1732 | + | $Tuple2([StringEntry(fD, makeString_2C(en._4, "_")), ScriptTransfer(eo.caller, en._2, ag)], $Tuple3(fv, er, ey)) | |
1627 | 1733 | } | |
1628 | 1734 | } | |
1629 | 1735 | else throw("Strict value is not equal to itself.") | |
1630 | 1736 | } | |
1631 | 1737 | ||
1632 | 1738 | ||
1633 | 1739 | ||
1634 | - | @Callable( | |
1635 | - | func updateEsStorage ( | |
1740 | + | @Callable(eo) | |
1741 | + | func updateEsStorage (fN) = if ((eo.caller != aE)) | |
1636 | 1742 | then throw("Permission denied") | |
1637 | - | else $Tuple2([StringEntry( | |
1743 | + | else $Tuple2([StringEntry(Z(), fN)], fN) | |
1638 | 1744 | ||
1639 | 1745 | ||
1640 | 1746 | ||
1641 | - | @Callable( | |
1642 | - | func updateDeliveryLocked ( | |
1747 | + | @Callable(eo) | |
1748 | + | func updateDeliveryLocked (fO) = if ((eo.caller != aE)) | |
1643 | 1749 | then throw("Permission denied") | |
1644 | - | else $Tuple2([IntegerEntry( | |
1750 | + | else $Tuple2([IntegerEntry(ab, fO)], fO) | |
1645 | 1751 | ||
1646 | 1752 | ||
1647 | 1753 | ||
1648 | - | @Callable( | |
1649 | - | func sendDeliveryReward ( | |
1754 | + | @Callable(eo) | |
1755 | + | func sendDeliveryReward (R) = if ((eo.caller != aE)) | |
1650 | 1756 | then throw("Permission denied") | |
1651 | 1757 | else { | |
1652 | - | let | |
1653 | - | let | |
1654 | - | let | |
1655 | - | let | |
1656 | - | $Tuple2([IntegerEntry( | |
1758 | + | let eD = valueOrElse(getInteger(aa), 0) | |
1759 | + | let fP = valueOrElse(getInteger(ab), 0) | |
1760 | + | let fQ = (k * o) | |
1761 | + | let fR = invoke(aG, "sendAcres", [R, fQ], nil) | |
1762 | + | $Tuple2([IntegerEntry(aa, (eD - k)), IntegerEntry(ab, (fP - k))], fR) | |
1657 | 1763 | } | |
1658 | 1764 | ||
1659 | 1765 |
github/deemru/w8io/169f3d6 768.32 ms ◑