tx · 9idqNa8EzcRooxoadRjadZNMYUuB1PMRVf8nvPdT6BgE 3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep: -0.03100000 Waves 2023.06.02 19:45 [2605317] smart account 3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep > SELF 0.00000000 Waves
{ "type": 13, "id": "9idqNa8EzcRooxoadRjadZNMYUuB1PMRVf8nvPdT6BgE", "fee": 3100000, "feeAssetId": null, "timestamp": 1685724348335, "version": 2, "chainId": 84, "sender": "3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep", "senderPublicKey": "7v5L7QkXxfkirALdyqmox38QCsa9jtfAtgUfHTh34eWq", "proofs": [ "4uaWeUzSoSwNX6DvFaFPczWC1pe8T3RdNm2Q4xkH58myyUXHtjz7pd5ZDH91DVQMJDzRfL2q5wHBjrJawNDusmRW" ], "script": "base64:BgIxCAISBAoCCBgSAwoBCBIECgIRERIECgIRERIDCgEREgQKAgEBEgQKAggIEgUKAwgICEYABWNoYWluCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAAt1c2R0QXNzZXRJZAQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAEghNp6sggDP07Ru8qO7ouTvMmC3Qtd+geWqNQj+agP/7kDCQAAAgEBVAUHJG1hdGNoMAEgVbHYn3KHgu/l41uNrAWrZd6aQ6EvFrsF8xq3h6XxxRgJAAIBAg1Vbmtub3duIGNoYWluABVkZWZhdWx0UmVzdEFkZHJlc3NTdHIEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDACIzNQUUN1dkZidmg0TGtQVW5yblUxejNqbmJBMXA5bTNXTmh2AwkAAAIBAVQFByRtYXRjaDACIzNNdW1rR0d6dENLQVhwV0RxeGtkZG9mcVhTVWJxUWt2U0p5CQACAQINVW5rbm93biBjaGFpbgADU0VQAgJfXwAFTVVMVDYAwIQ9AAVNVUxUNwCAreIEAAVNVUxUOACAwtcvAAZNVUxUMTAAgMivoCUAC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0BQt1c2RCcDJXaEZlZQULdXNkdEFzc2V0SWQJAQ5TY3JpcHRUcmFuc2ZlcgMJARFAZXh0ck5hdGl2ZSgxMDYyKQEJAQV2YWx1ZQEFBXJlZkJ5BQt1c2RCcDJXaEZlZQULdXNkdEFzc2V0SWQJAM0IAgkAzQgCBQhhY3Rpb25zMQkBDlNjcmlwdFRyYW5zZmVyAwkBEUBleHRyTmF0aXZlKDEwNjIpAQUJbGFuZE93bmVyCQBlAggFAXACXzYJAGgCAAMFC3VzZEJwMldoRmVlBQt1c2R0QXNzZXRJZAkBDlNjcmlwdFRyYW5zZmVyAwUMcmVzdENvbnRyYWN0BQt1c2RCcDJXaEZlZQULdXNkdEFzc2V0SWQDCQECIT0CCQCQAwEIBQFpCHBheW1lbnRzAAAJAAIBAhJObyBwYXltZW50cyBuZWVkZWQFCGFjdGlvbnMxCQCUCgIFCGFjdGlvbnMyCQCVCgMFB2Jsb2NrZWQFBndoU2F2ZQUGYnBTYXZlAJrvlgU=", "height": 2605317, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3wQ8pjGoxB995d3EYL98dkcif5V53i2GoLKQSw62f6sH Next: GfMbtyAJ2t8HJDNRvwkUTqV4jqgibj3i3Ac2NcW23GhP Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let a = | |
4 | + | let a = take(drop(this.bytes, 1), 1) | |
5 | 5 | ||
6 | - | let b = 1000000 | |
7 | - | ||
8 | - | let c = 10000000 | |
9 | - | ||
10 | - | let d = 100000000 | |
11 | - | ||
12 | - | let e = 10000000000 | |
13 | - | ||
14 | - | let f = take(drop(this.bytes, 1), 1) | |
15 | - | ||
16 | - | let g = { | |
17 | - | let h = f | |
18 | - | if ((base58'2W' == h)) | |
6 | + | let b = { | |
7 | + | let c = a | |
8 | + | if ((base58'2W' == c)) | |
19 | 9 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
20 | - | else if ((base58'2T' == | |
10 | + | else if ((base58'2T' == c)) | |
21 | 11 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
22 | 12 | else throw("Unknown chain") | |
23 | 13 | } | |
24 | 14 | ||
25 | - | let | |
26 | - | let | |
27 | - | if ((base58'2W' == | |
15 | + | let d = { | |
16 | + | let c = a | |
17 | + | if ((base58'2W' == c)) | |
28 | 18 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
29 | - | else if ((base58'2T' == | |
19 | + | else if ((base58'2T' == c)) | |
30 | 20 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
31 | 21 | else throw("Unknown chain") | |
32 | 22 | } | |
33 | 23 | ||
34 | - | func j (k,l) = valueOrErrorMessage(getString(k, l), makeString(["mandatory ", toString(k), ".", l, " is not defined"], "")) | |
24 | + | let e = "__" | |
25 | + | ||
26 | + | let f = 1000000 | |
27 | + | ||
28 | + | let g = 10000000 | |
29 | + | ||
30 | + | let h = 100000000 | |
31 | + | ||
32 | + | let i = 10000000000 | |
33 | + | ||
34 | + | let j = "LAND" | |
35 | + | ||
36 | + | let k = 6 | |
37 | + | ||
38 | + | let l = "Africa_F_Africa" | |
39 | + | ||
40 | + | let m = 39637 | |
41 | + | ||
42 | + | let n = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"] | |
43 | + | ||
44 | + | let o = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
45 | + | ||
46 | + | let p = ["First Aid Kit", "Backpack", "Food Ration", "Jet Pack", "Shield"] | |
47 | + | ||
48 | + | let q = ["Asia", "Europe", "Americas", "Oceania", "Africa"] | |
49 | + | ||
50 | + | let r = ["1_1_1_2_2_5_1_10_0", "2_2_2_4_4_10_1_10_0", "3_3_3_6_6_15_1_10_0", "2_5_5_2_7_5_2_100_1", "4_10_10_4_14_10_2_100_1", "6_15_15_6_21_15_2_100_1", "1_1_1_1_1_8_1_10_2", "2_2_2_2_2_16_1_10_2", "3_3_3_3_3_24_1_10_2", "9_9_1_5_5_1_5_100_3", "18_18_2_10_10_2_5_100_3", "27_27_3_15_15_3_5_100_3", "2_2_1_2_2_2_1_10_4", "4_4_2_4_4_4_1_10_4", "6_6_3_6_6_6_1_10_4"] | |
51 | + | ||
52 | + | let s = 7 | |
53 | + | ||
54 | + | let t = 8 | |
55 | + | ||
56 | + | let u = 0 | |
57 | + | ||
58 | + | let v = 1 | |
59 | + | ||
60 | + | let w = 2 | |
61 | + | ||
62 | + | let x = 3 | |
63 | + | ||
64 | + | let y = 4 | |
65 | + | ||
66 | + | let z = 0 | |
67 | + | ||
68 | + | let A = 1 | |
69 | + | ||
70 | + | let B = 3 | |
71 | + | ||
72 | + | let C = 0 | |
73 | + | ||
74 | + | let D = 1 | |
75 | + | ||
76 | + | let E = 2 | |
77 | + | ||
78 | + | let F = 3 | |
79 | + | ||
80 | + | func G (H,I) = valueOrErrorMessage(getString(H, I), makeString(["mandatory ", toString(H), ".", I, " is not defined"], "")) | |
35 | 81 | ||
36 | 82 | ||
37 | - | func m (l,n) = valueOrElse(getInteger(this, l), n) | |
83 | + | let J = 1 | |
84 | + | ||
85 | + | func K () = "%s__restConfig" | |
38 | 86 | ||
39 | 87 | ||
40 | - | let o = 1 | |
41 | - | ||
42 | - | let p = 2 | |
43 | - | ||
44 | - | let q = 3 | |
45 | - | ||
46 | - | func r () = "%s__restConfig" | |
88 | + | func L () = "%s__restAddr" | |
47 | 89 | ||
48 | 90 | ||
49 | - | func | |
91 | + | func M (N) = split_4C(G(N, K()), e) | |
50 | 92 | ||
51 | 93 | ||
52 | - | func | |
94 | + | func O (P,Q) = valueOrErrorMessage(addressFromString(P[Q]), ("Rest cfg doesn't contain address at index " + toString(Q))) | |
53 | 95 | ||
54 | 96 | ||
55 | - | func v (w,x) = valueOrErrorMessage(addressFromString(w[x]), ("Rest cfg doesn't contain address at index " + toString(x))) | |
97 | + | let R = addressFromStringValue(valueOrElse(getString(this, L()), d)) | |
98 | + | ||
99 | + | let P = M(R) | |
100 | + | ||
101 | + | let S = O(P, J) | |
102 | + | ||
103 | + | let T = 10000000000 | |
104 | + | ||
105 | + | let U = 200 | |
106 | + | ||
107 | + | let V = 300 | |
108 | + | ||
109 | + | let W = 10000 | |
110 | + | ||
111 | + | let X = 100000 | |
112 | + | ||
113 | + | func Y (Z,aa) = ((("factoryWhByContinentAndRes_" + Z) + "_") + toString(aa)) | |
56 | 114 | ||
57 | 115 | ||
58 | - | let y = addressFromStringValue(valueOrElse(getString(this, s()), i)) | |
59 | - | ||
60 | - | let w = t(y) | |
61 | - | ||
62 | - | let z = v(w, o) | |
63 | - | ||
64 | - | let A = "Africa_F_Africa" | |
65 | - | ||
66 | - | let B = 6 | |
67 | - | ||
68 | - | let C = 10000000000 | |
69 | - | ||
70 | - | let D = 39637 | |
71 | - | ||
72 | - | let E = 10000 | |
73 | - | ||
74 | - | let F = 200 | |
75 | - | ||
76 | - | let G = 300 | |
77 | - | ||
78 | - | let H = "LAND" | |
79 | - | ||
80 | - | let I = "DUCK" | |
81 | - | ||
82 | - | let J = 10000000000 | |
83 | - | ||
84 | - | let K = 10000 | |
85 | - | ||
86 | - | let L = 100000 | |
87 | - | ||
88 | - | let M = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"] | |
89 | - | ||
90 | - | let N = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
91 | - | ||
92 | - | let O = ["First Aid Kit", "Backpack", "Food Ration", "Jet Pack", "Shield"] | |
93 | - | ||
94 | - | let P = ["Americas", "Europe", "Asia", "Africa", "Oceania"] | |
95 | - | ||
96 | - | let Q = ["1_1_1_2_2_5_1_10_0", "2_2_2_4_4_10_1_10_0", "3_3_3_6_6_15_1_10_0", "2_5_5_2_7_5_2_100_1", "4_10_10_4_14_10_2_100_1", "6_15_15_6_21_15_2_100_1", "1_1_1_1_1_8_1_10_2", "2_2_2_2_2_16_1_10_2", "3_3_3_3_3_24_1_10_2", "9_9_1_5_5_1_5_100_3", "18_18_2_10_10_2_5_100_3", "27_27_3_15_15_3_5_100_3", "2_2_1_2_2_2_1_10_4", "4_4_2_4_4_4_1_10_4", "6_6_3_6_6_6_1_10_4"] | |
97 | - | ||
98 | - | let R = 0 | |
99 | - | ||
100 | - | let S = 1 | |
101 | - | ||
102 | - | let T = 2 | |
103 | - | ||
104 | - | let U = 3 | |
105 | - | ||
106 | - | let V = 4 | |
107 | - | ||
108 | - | let W = 0 | |
109 | - | ||
110 | - | let X = 1 | |
111 | - | ||
112 | - | let Y = 2 | |
113 | - | ||
114 | - | let Z = 3 | |
115 | - | ||
116 | - | let aa = 4 | |
117 | - | ||
118 | - | let ab = 5 | |
119 | - | ||
120 | - | let ac = 6 | |
121 | - | ||
122 | - | let ad = 7 | |
123 | - | ||
124 | - | let ae = 8 | |
125 | - | ||
126 | - | func af (ag,ah) = ((("factoryWhByContinentAndRes_" + ag) + "_") + toString(ah)) | |
116 | + | func ab (ac) = ("landOrder_" + ac) | |
127 | 117 | ||
128 | 118 | ||
129 | - | func | |
119 | + | func ad (ae) = ("stakedDuckByOwner_" + ae) | |
130 | 120 | ||
131 | 121 | ||
132 | - | func | |
122 | + | func af (ag) = ("backPack_" + ag) | |
133 | 123 | ||
134 | 124 | ||
135 | - | func | |
125 | + | func ah (ag) = ("duckLocation_" + ag) | |
136 | 126 | ||
137 | 127 | ||
138 | - | func | |
128 | + | func ai () = "contractsBlocked" | |
139 | 129 | ||
140 | 130 | ||
141 | - | func | |
131 | + | func aj (ak) = ("nftOwner_" + ak) | |
142 | 132 | ||
143 | 133 | ||
144 | - | func | |
134 | + | func al (ak) = ("stakedTime_" + ak) | |
145 | 135 | ||
146 | 136 | ||
147 | - | func | |
137 | + | func am (an) = ("accRefBy_" + an) | |
148 | 138 | ||
149 | 139 | ||
150 | - | ||
140 | + | let ao = 0 | |
151 | 141 | ||
142 | + | let ap = 1 | |
152 | 143 | ||
153 | - | let | |
144 | + | let aq = 2 | |
154 | 145 | ||
155 | - | let | |
146 | + | let ar = 0 | |
156 | 147 | ||
157 | - | let | |
148 | + | let as = 1 | |
158 | 149 | ||
159 | - | let | |
150 | + | let at = 2 | |
160 | 151 | ||
161 | - | let az = 1 | |
162 | - | ||
163 | - | let aA = 2 | |
164 | - | ||
165 | - | let aB = 3 | |
166 | - | ||
167 | - | let aC = 0 | |
168 | - | ||
169 | - | let aD = 1 | |
170 | - | ||
171 | - | let aE = 2 | |
172 | - | ||
173 | - | let aF = 3 | |
174 | - | ||
175 | - | let aG = 4 | |
176 | - | ||
177 | - | let aH = 0 | |
178 | - | ||
179 | - | let aI = 1 | |
180 | - | ||
181 | - | let aJ = 2 | |
182 | - | ||
183 | - | let aK = 3 | |
184 | - | ||
185 | - | let aL = 0 | |
186 | - | ||
187 | - | let aM = 1 | |
188 | - | ||
189 | - | let aN = 2 | |
190 | - | ||
191 | - | func aO (aP) = { | |
192 | - | let h = aP | |
193 | - | if ($isInstanceOf(h, "String")) | |
152 | + | func au (av) = { | |
153 | + | let c = av | |
154 | + | if ($isInstanceOf(c, "String")) | |
194 | 155 | then { | |
195 | - | let | |
196 | - | | |
156 | + | let aw = c | |
157 | + | aw | |
197 | 158 | } | |
198 | 159 | else throw("fail to cast into String") | |
199 | 160 | } | |
200 | 161 | ||
201 | 162 | ||
202 | - | func | |
203 | - | let | |
204 | - | [if ((size(split( | |
205 | - | then | |
206 | - | else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split( | |
207 | - | then | |
208 | - | else "0@0_0@0_0@0_0@0_0@0_0@0", | |
163 | + | func ax (ay) = { | |
164 | + | let az = split(valueOrElse(getString(ay), "0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:"), ":") | |
165 | + | [if ((size(split(az[ar], "_")) == k)) | |
166 | + | then az[ar] | |
167 | + | else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split(az[as], "_")) == k)) | |
168 | + | then az[as] | |
169 | + | else "0@0_0@0_0@0_0@0_0@0_0@0", az[at]] | |
209 | 170 | } | |
210 | 171 | ||
211 | 172 | ||
212 | - | func | |
173 | + | func aA (aB,aC,aD) = if (aD) | |
213 | 174 | then { | |
214 | - | let | |
215 | - | then ((( | |
216 | - | else -((((-( | |
217 | - | ( | |
175 | + | let aE = if ((aB >= 0)) | |
176 | + | then (((aB + aC) - 1) / aC) | |
177 | + | else -((((-(aB) + aC) - 1) / aC)) | |
178 | + | (aE * h) | |
218 | 179 | } | |
219 | - | else | |
180 | + | else aB | |
220 | 181 | ||
221 | 182 | ||
222 | - | func | |
223 | - | let | |
224 | - | let | |
225 | - | let | |
183 | + | func aF (aG,aa,aB,aH) = { | |
184 | + | let aI = Y(aG, aa) | |
185 | + | let aJ = valueOrElse(getInteger(aI), 0) | |
186 | + | let aK = if ((aJ > T)) | |
226 | 187 | then 0 | |
227 | - | else if ((( | |
228 | - | then ( | |
229 | - | else | |
230 | - | let | |
231 | - | let | |
232 | - | if ((( | |
233 | - | then throw((((((((((("Actual price = " + toString( | |
234 | - | else $Tuple2(IntegerEntry( | |
188 | + | else if (((aJ + aB) > T)) | |
189 | + | then (T - aJ) | |
190 | + | else aB | |
191 | + | let aL = (fraction(aK, ((U * m) - fraction(((100 * aJ) + (50 * aK)), m, T)), i) + fraction((aB - aK), m, h)) | |
192 | + | let aM = (aH - (aH / 100)) | |
193 | + | if (((aM * aB) > (aL * h))) | |
194 | + | then throw((((((((((("Actual price = " + toString(aL)) + " / ") + toString(aB)) + " < minPrice = ") + toString(aH)) + ", (") + aG) + ", ") + n[aa]) + ")")) | |
195 | + | else $Tuple2(IntegerEntry(aI, (aJ + aB)), aL) | |
235 | 196 | } | |
236 | 197 | ||
237 | 198 | ||
238 | - | func | |
239 | - | let | |
240 | - | let | |
241 | - | let | |
242 | - | then min([ | |
199 | + | func aN (aG,aO,aB,aP) = { | |
200 | + | let aI = Y(aG, aO) | |
201 | + | let aJ = valueOrElse(getInteger(aI), 0) | |
202 | + | let aQ = if ((aJ > T)) | |
203 | + | then min([aB, (aJ - T)]) | |
243 | 204 | else 0 | |
244 | - | let | |
245 | - | let | |
246 | - | let | |
247 | - | let | |
248 | - | if ((( | |
249 | - | then throw((((((((((("Actual price = " + toString( | |
250 | - | else $Tuple3(IntegerEntry( | |
205 | + | let aR = min([aJ, (aB - aQ)]) | |
206 | + | let aS = (aR + aQ) | |
207 | + | let aT = (fraction(aR, ((V * m) - fraction(((100 * aJ) - (50 * aR)), m, T)), i) + fraction(aQ, (2 * m), h)) | |
208 | + | let aU = (aP + (aP / 100)) | |
209 | + | if (((aT * h) > (aU * aS))) | |
210 | + | then throw((((((((((("Actual price = " + toString(aT)) + " / ") + toString(aS)) + " > maxPrice = ") + toString(aP)) + ", (") + aG) + ", ") + o[aO]) + ")")) | |
211 | + | else $Tuple3(IntegerEntry(aI, (aJ - aS)), aT, aS) | |
251 | 212 | } | |
252 | 213 | ||
253 | 214 | ||
254 | - | func | |
255 | - | let | |
256 | - | [toString(valueOrElse(parseInt( | |
257 | - | then | |
258 | - | else "0_0_0_0_0_0", if ((size(split( | |
259 | - | then | |
260 | - | else "0_0_0_0_0_0", | |
215 | + | func aV (aW) = { | |
216 | + | let az = split(valueOrElse(getString(S, aW), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":") | |
217 | + | [toString(valueOrElse(parseInt(az[C]), 0)), if ((size(split(az[D], "_")) == k)) | |
218 | + | then az[D] | |
219 | + | else "0_0_0_0_0_0", if ((size(split(az[E], "_")) == k)) | |
220 | + | then az[E] | |
221 | + | else "0_0_0_0_0_0", az[F]] | |
261 | 222 | } | |
262 | 223 | ||
263 | 224 | ||
264 | - | func | |
225 | + | func aX () = if (valueOrElse(getBoolean(S, ai()), false)) | |
265 | 226 | then throw("Contracts are under maintenance") | |
266 | 227 | else unit | |
267 | 228 | ||
268 | 229 | ||
269 | - | func | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
273 | - | then parseIntValue(split( | |
230 | + | func aY (aZ,ba) = { | |
231 | + | let bb = aZ._1 | |
232 | + | let bc = aZ._8 | |
233 | + | let aC = if (bc) | |
234 | + | then parseIntValue(split(r[bb], "_")[s]) | |
274 | 235 | else 0 | |
275 | - | let | |
276 | - | if ((size( | |
236 | + | let bd = split(ba, "@") | |
237 | + | if ((size(bd) != 2)) | |
277 | 238 | then throw("Incorrect order format, should be amount@price") | |
278 | 239 | else { | |
279 | - | let | |
280 | - | let | |
281 | - | let | |
282 | - | let | |
283 | - | let | |
284 | - | then parseIntValue( | |
240 | + | let be = parseIntValue(bd[0]) | |
241 | + | let bf = parseIntValue(bd[1]) | |
242 | + | let bg = fraction(be, bf, h) | |
243 | + | let bh = aA(be, aC, bc) | |
244 | + | let bi = if ((size(aZ._6) > bb)) | |
245 | + | then parseIntValue(aZ._6[bb]) | |
285 | 246 | else 0 | |
286 | - | let | |
287 | - | then | |
247 | + | let bj = split(if ((size(aZ._7) > bb)) | |
248 | + | then aZ._7[bb] | |
288 | 249 | else "0@0", "@") | |
289 | - | let | |
290 | - | let | |
291 | - | if (if ((0 > | |
250 | + | let bk = parseIntValue(bj[0]) | |
251 | + | let bl = parseIntValue(bj[1]) | |
252 | + | if (if ((0 > bl)) | |
292 | 253 | then true | |
293 | - | else (0 > | |
254 | + | else (0 > bf)) | |
294 | 255 | then throw("Price can't be negative") | |
295 | 256 | else { | |
296 | - | let | |
297 | - | let | |
298 | - | if (( | |
299 | - | then if (( | |
300 | - | then $Tuple8(( | |
301 | - | else $Tuple8(( | |
302 | - | else if (( | |
303 | - | then if ((0 > | |
304 | - | then $Tuple8(( | |
305 | - | else $Tuple8(( | |
306 | - | else if ((0 > | |
257 | + | let bm = fraction(bk, bl, h) | |
258 | + | let bn = aA(bk, aC, bc) | |
259 | + | if ((be == 0)) | |
260 | + | then if ((bk > 0)) | |
261 | + | then $Tuple8((bb + 1), (aZ._2 :+ toString(bi)), aZ._3, aZ._4, (aZ._5 - bm), aZ._6, aZ._7, bc) | |
262 | + | else $Tuple8((bb + 1), (aZ._2 :+ toString((bi - bk))), aZ._3, aZ._4, aZ._5, aZ._6, aZ._7, bc) | |
263 | + | else if ((be > 0)) | |
264 | + | then if ((0 > bk)) | |
265 | + | then $Tuple8((bb + 1), (aZ._2 :+ toString((bi - bk))), (aZ._3 + bh), aZ._4, (aZ._5 + bg), aZ._6, aZ._7, bc) | |
266 | + | else $Tuple8((bb + 1), (aZ._2 :+ toString(bi)), (aZ._3 + bh), aZ._4, ((aZ._5 + bg) - bm), aZ._6, aZ._7, bc) | |
267 | + | else if ((0 > bk)) | |
307 | 268 | then { | |
308 | - | let | |
309 | - | if ((0 > ( | |
310 | - | then throw((((("Attempt to take " + toString( | |
311 | - | else $Tuple8(( | |
269 | + | let bo = (bk - be) | |
270 | + | if ((0 > (bi - bo))) | |
271 | + | then throw((((("Attempt to take " + toString(bo)) + " from warehouse, but only ") + toString(bi)) + " available")) | |
272 | + | else $Tuple8((bb + 1), (aZ._2 :+ toString((bi - bo))), aZ._3, (aZ._4 - bh), aZ._5, aZ._6, aZ._7, bc) | |
312 | 273 | } | |
313 | - | else if ((0 > ( | |
314 | - | then throw((((("Attempt to take " + toString(-( | |
315 | - | else $Tuple8(( | |
274 | + | else if ((0 > (bi + be))) | |
275 | + | then throw((((("Attempt to take " + toString(-(be))) + " from warehouse, but only ") + toString(bi)) + " available")) | |
276 | + | else $Tuple8((bb + 1), (aZ._2 :+ toString((bi + be))), aZ._3, (aZ._4 - bh), (aZ._5 - bm), aZ._6, aZ._7, bc) | |
316 | 277 | } | |
317 | 278 | } | |
318 | 279 | } | |
319 | 280 | ||
320 | 281 | ||
321 | - | func | |
322 | - | let | |
323 | - | let | |
324 | - | let | |
282 | + | func bp (bq,br,bs) = { | |
283 | + | let bt = split(bq[v], "_") | |
284 | + | let bu = split(bq[w], "_") | |
285 | + | let bv = if ((bq[x] == "")) | |
325 | 286 | then nil | |
326 | - | else split( | |
327 | - | let | |
328 | - | let | |
329 | - | let | |
287 | + | else split(bq[x], "_") | |
288 | + | let bw = split(br[ar], "_") | |
289 | + | let bx = split(br[as], "_") | |
290 | + | let by = if ((br[at] == "")) | |
330 | 291 | then nil | |
331 | - | else split( | |
332 | - | if ((size( | |
333 | - | then throw(" | |
292 | + | else split(br[at], "_") | |
293 | + | if ((size(bs) != 3)) | |
294 | + | then throw("newOrderStr should contain exactly 2 ':' separators") | |
334 | 295 | else { | |
335 | - | let | |
336 | - | let | |
337 | - | let | |
296 | + | let bz = split(bs[0], "_") | |
297 | + | let bA = split(bs[1], "_") | |
298 | + | let bB = if ((bs[2] == "")) | |
338 | 299 | then nil | |
339 | - | else split( | |
340 | - | if ((size( | |
300 | + | else split(bs[2], "_") | |
301 | + | if ((size(bz) != k)) | |
341 | 302 | then throw("All 6 resources should be passed") | |
342 | - | else if ((size( | |
303 | + | else if ((size(bA) != k)) | |
343 | 304 | then throw("All 6 materials should be passed") | |
344 | 305 | else { | |
345 | - | let | |
346 | - | let | |
347 | - | let | |
348 | - | let | |
349 | - | func | |
350 | - | then | |
351 | - | else | |
306 | + | let bC = { | |
307 | + | let bD = bz | |
308 | + | let bE = size(bD) | |
309 | + | let bF = $Tuple8(0, nil, 0, 0, 0, bt, bw, false) | |
310 | + | func bG (bH,bI) = if ((bI >= bE)) | |
311 | + | then bH | |
312 | + | else aY(bH, bD[bI]) | |
352 | 313 | ||
353 | - | func | |
354 | - | then | |
314 | + | func bJ (bH,bI) = if ((bI >= bE)) | |
315 | + | then bH | |
355 | 316 | else throw("List size exceeds 6") | |
356 | 317 | ||
357 | - | | |
318 | + | bJ(bG(bG(bG(bG(bG(bG(bF, 0), 1), 2), 3), 4), 5), 6) | |
358 | 319 | } | |
359 | - | let | |
360 | - | let | |
361 | - | let | |
362 | - | let | |
363 | - | func | |
364 | - | then | |
365 | - | else | |
320 | + | let aS = { | |
321 | + | let bD = bA | |
322 | + | let bE = size(bD) | |
323 | + | let bF = $Tuple8(0, nil, bC._3, bC._4, bC._5, bu, bx, false) | |
324 | + | func bK (bH,bI) = if ((bI >= bE)) | |
325 | + | then bH | |
326 | + | else aY(bH, bD[bI]) | |
366 | 327 | ||
367 | - | func | |
368 | - | then | |
328 | + | func bL (bH,bI) = if ((bI >= bE)) | |
329 | + | then bH | |
369 | 330 | else throw("List size exceeds 6") | |
370 | 331 | ||
371 | - | | |
332 | + | bL(bK(bK(bK(bK(bK(bK(bF, 0), 1), 2), 3), 4), 5), 6) | |
372 | 333 | } | |
373 | - | let | |
334 | + | let az = if ((size(bB) != 0)) | |
374 | 335 | then { | |
375 | - | let | |
376 | - | let | |
377 | - | let | |
378 | - | func | |
379 | - | then | |
380 | - | else | |
336 | + | let bD = bB | |
337 | + | let bE = size(bD) | |
338 | + | let bF = $Tuple8(0, nil, aS._3, aS._4, aS._5, bv, by, true) | |
339 | + | func bM (bH,bI) = if ((bI >= bE)) | |
340 | + | then bH | |
341 | + | else aY(bH, bD[bI]) | |
381 | 342 | ||
382 | - | func | |
383 | - | then | |
343 | + | func bN (bH,bI) = if ((bI >= bE)) | |
344 | + | then bH | |
384 | 345 | else throw("List size exceeds 50") | |
385 | 346 | ||
386 | - | | |
347 | + | bN(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bF, 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) | |
387 | 348 | } | |
388 | - | else $Tuple8(0, | |
389 | - | $Tuple6( | |
349 | + | else $Tuple8(0, bv, aS._3, aS._4, aS._5, bv, by, true) | |
350 | + | $Tuple6(bC._2, aS._2, az._2, az._3, az._4, az._5) | |
390 | 351 | } | |
391 | 352 | } | |
392 | 353 | } | |
393 | 354 | ||
394 | 355 | ||
395 | - | func | |
396 | - | let | |
397 | - | let | |
398 | - | let | |
399 | - | then parseIntValue(split( | |
356 | + | func bO (aZ,bP) = { | |
357 | + | let bb = aZ._7 | |
358 | + | let bc = aZ._12 | |
359 | + | let aC = if (bc) | |
360 | + | then parseIntValue(split(r[bb], "_")[s]) | |
400 | 361 | else 0 | |
401 | - | let | |
402 | - | if ((size( | |
362 | + | let bQ = split(bP, "@") | |
363 | + | if ((size(bQ) != 2)) | |
403 | 364 | then throw("Incorrect order format, should be amount@price") | |
404 | 365 | else { | |
405 | - | let | |
406 | - | let | |
407 | - | if ((0 > | |
366 | + | let bR = parseIntValue(bQ[0]) | |
367 | + | let bS = parseIntValue(bQ[1]) | |
368 | + | if ((0 > bS)) | |
408 | 369 | then throw("Price can't be negative") | |
409 | 370 | else { | |
410 | - | let | |
411 | - | let | |
412 | - | then parseIntValue( | |
371 | + | let bT = fraction(bR, bS, h) | |
372 | + | let bU = if ((size(aZ._8) > bb)) | |
373 | + | then parseIntValue(aZ._8[bb]) | |
413 | 374 | else 0 | |
414 | - | let | |
415 | - | then parseIntValue( | |
375 | + | let bi = if ((size(aZ._9) > bb)) | |
376 | + | then parseIntValue(aZ._9[bb]) | |
416 | 377 | else 0 | |
417 | - | let cp = split(bt._10[bv], "@") | |
418 | - | let cq = parseIntValue(cp[0]) | |
419 | - | let cr = parseIntValue(cp[1]) | |
420 | - | if (if ((cl != 0)) | |
421 | - | then (cm != cr) | |
378 | + | let bV = if ((size(aZ._10) > bb)) | |
379 | + | then aZ._10[bb] | |
380 | + | else "0@0" | |
381 | + | let bW = split(bV, "@") | |
382 | + | let bX = parseIntValue(bW[0]) | |
383 | + | let bY = parseIntValue(bW[1]) | |
384 | + | if (if ((bR != 0)) | |
385 | + | then (bS != bY) | |
422 | 386 | else false) | |
423 | - | then throw(((((("Prices of " + | |
387 | + | then throw(((((("Prices of " + aZ._11[bb]) + " don't match! WH price=") + toString(bY)) + ", your price=") + toString(bS))) | |
424 | 388 | else { | |
425 | - | let | |
426 | - | let | |
427 | - | if (( | |
428 | - | then $Tuple12(( | |
429 | - | else if (( | |
430 | - | then if ((0 > | |
431 | - | then if (( | |
432 | - | then throw(((((("Attempt to buy " + toString( | |
433 | - | else $Tuple12(( | |
434 | - | else throw((("Attempt to buy " + | |
435 | - | else if (( | |
436 | - | then if ((-( | |
437 | - | then throw(((((("Attempt to sell " + toString(-( | |
438 | - | else if ((-( | |
439 | - | then throw(((((("Attempt to sell " + toString(-( | |
440 | - | else $Tuple12(( | |
441 | - | else throw((("Attempt to sell " + | |
389 | + | let bZ = fraction(bX, bY, h) | |
390 | + | let ca = aA(bR, aC, bc) | |
391 | + | if ((bR == 0)) | |
392 | + | then $Tuple12((aZ._1 :+ toString(bi)), (aZ._2 :+ bV), (aZ._3 :+ toString(bU)), aZ._4, aZ._5, aZ._6, (aZ._7 + 1), aZ._8, aZ._9, aZ._10, aZ._11, bc) | |
393 | + | else if ((bR > 0)) | |
394 | + | then if ((0 > bX)) | |
395 | + | then if ((bR > -(bX))) | |
396 | + | then throw(((((("Attempt to buy " + toString(bR)) + " of ") + aZ._11[bb]) + ", but warehouse only sells ") + toString(-(bX)))) | |
397 | + | else $Tuple12((aZ._1 :+ toString(bi)), (aZ._2 :+ ((toString((bX + bR)) + "@") + toString(bY))), (aZ._3 :+ toString((bU + bR))), (aZ._4 + ca), aZ._5, (aZ._6 + bT), (aZ._7 + 1), aZ._8, aZ._9, aZ._10, aZ._11, bc) | |
398 | + | else throw((("Attempt to buy " + aZ._11[bb]) + " while warehouse doesn't sell it")) | |
399 | + | else if ((bX > 0)) | |
400 | + | then if ((-(bR) > bX)) | |
401 | + | then throw(((((("Attempt to sell " + toString(-(bR))) + " of ") + aZ._11[bb]) + ", but warehouse only buys ") + toString(bX))) | |
402 | + | else if ((-(bR) > bU)) | |
403 | + | then throw(((((("Attempt to sell " + toString(-(bR))) + ", but you only have ") + toString(bU)) + " of ") + aZ._11[bb])) | |
404 | + | else $Tuple12((aZ._1 :+ toString((bi - bR))), (aZ._2 :+ ((toString((bX + bR)) + "@") + toString(bY))), (aZ._3 :+ toString((bU + bR))), (aZ._4 - ca), (aZ._5 - bT), aZ._6, (aZ._7 + 1), aZ._8, aZ._9, aZ._10, aZ._11, bc) | |
405 | + | else throw((("Attempt to sell " + aZ._11[bb]) + " while warehouse doesn't buy it")) | |
442 | 406 | } | |
443 | 407 | } | |
444 | 408 | } | |
445 | 409 | } | |
446 | 410 | ||
447 | 411 | ||
448 | - | @Callable( | |
449 | - | func recalcLockedVolumeREADONLY ( | |
450 | - | let | |
451 | - | let | |
452 | - | $Tuple2(nil, ( | |
412 | + | @Callable(cb) | |
413 | + | func recalcLockedVolumeREADONLY (ac,cc) = { | |
414 | + | let br = ax(ab(ac)) | |
415 | + | let cd = bp(cc, br, br) | |
416 | + | $Tuple2(nil, (cd._4 + cd._5)) | |
453 | 417 | } | |
454 | 418 | ||
455 | 419 | ||
456 | 420 | ||
457 | - | @Callable( | |
458 | - | func constructorV1 ( | |
421 | + | @Callable(cb) | |
422 | + | func constructorV1 (ce) = if ((cb.caller != this)) | |
459 | 423 | then throw("Permission denied") | |
460 | - | else [StringEntry( | |
424 | + | else [StringEntry(L(), ce)] | |
461 | 425 | ||
462 | 426 | ||
463 | 427 | ||
464 | - | @Callable( | |
465 | - | func sellResources ( | |
466 | - | let | |
467 | - | if (( | |
428 | + | @Callable(cb) | |
429 | + | func sellResources (cf,cg) = { | |
430 | + | let ch = aX() | |
431 | + | if ((ch == ch)) | |
468 | 432 | then { | |
469 | - | let | |
470 | - | if ((size( | |
433 | + | let ag = valueOrErrorMessage(getString(S, ad(toString(cb.caller))), "You don't have a duck staked") | |
434 | + | if ((size(cb.payments) != 0)) | |
471 | 435 | then throw("sellResources doesn't require any payments") | |
472 | 436 | else { | |
473 | - | let | |
474 | - | if (( | |
475 | - | then throw(("Duck location type should be Factory, but is " + | |
437 | + | let ci = split(valueOrElse(getString(S, ah(ag)), l), "_") | |
438 | + | if ((ci[ap] != "F")) | |
439 | + | then throw(("Duck location type should be Factory, but is " + ci[ap])) | |
476 | 440 | else { | |
477 | - | let | |
478 | - | let | |
479 | - | let | |
480 | - | func | |
481 | - | then throw(((((("You have " + | |
482 | - | else if ((0 > | |
483 | - | then throw(((("You tried to sell negative amount of " + | |
484 | - | else if (( | |
441 | + | let aG = ci[aq] | |
442 | + | let cj = aV(af(ag)) | |
443 | + | let ck = split(cj[D], "_") | |
444 | + | func cl (aZ,bb) = if ((cf[bb] > parseIntValue(ck[bb]))) | |
445 | + | then throw(((((("You have " + ck[bb]) + " of ") + n[bb]) + ", but tried to sell ") + toString(cf[bb]))) | |
446 | + | else if ((0 > cf[bb])) | |
447 | + | then throw(((("You tried to sell negative amount of " + n[bb]) + ": ") + toString(cf[bb]))) | |
448 | + | else if ((cf[bb] > 0)) | |
485 | 449 | then { | |
486 | - | let | |
487 | - | $Tuple3(( | |
450 | + | let cm = aF(aG, bb, cf[bb], cg[bb]) | |
451 | + | $Tuple3((aZ._1 :+ cm._1), (aZ._2 :+ toString((parseIntValue(ck[bb]) - cf[bb]))), (aZ._3 + cm._2)) | |
488 | 452 | } | |
489 | - | else $Tuple3( | |
453 | + | else $Tuple3(aZ._1, (aZ._2 :+ ck[bb]), aZ._3) | |
490 | 454 | ||
491 | - | let | |
492 | - | let | |
493 | - | let | |
494 | - | let | |
495 | - | func | |
496 | - | then | |
497 | - | else | |
455 | + | let cn = { | |
456 | + | let bD = [0, 1, 2, 3, 4, 5] | |
457 | + | let bE = size(bD) | |
458 | + | let bF = $Tuple3(nil, nil, 0) | |
459 | + | func bG (bH,bI) = if ((bI >= bE)) | |
460 | + | then bH | |
461 | + | else cl(bH, bD[bI]) | |
498 | 462 | ||
499 | - | func | |
500 | - | then | |
463 | + | func bJ (bH,bI) = if ((bI >= bE)) | |
464 | + | then bH | |
501 | 465 | else throw("List size exceeds 6") | |
502 | 466 | ||
503 | - | | |
467 | + | bJ(bG(bG(bG(bG(bG(bG(bF, 0), 1), 2), 3), 4), 5), 6) | |
504 | 468 | } | |
505 | - | let | |
506 | - | let | |
507 | - | $Tuple2(( | |
469 | + | let co = makeString([cj[C], makeString(cn._2, "_"), cj[E], cj[F]], ":") | |
470 | + | let cp = au(invoke(S, "updateBackpack", [ag, co], nil)) | |
471 | + | $Tuple2((cn._1 :+ ScriptTransfer(cb.caller, cn._3, b)), cp) | |
508 | 472 | } | |
509 | 473 | } | |
510 | 474 | } | |
513 | 477 | ||
514 | 478 | ||
515 | 479 | ||
516 | - | @Callable( | |
517 | - | func buyMaterials ( | |
518 | - | let | |
519 | - | if (( | |
480 | + | @Callable(cb) | |
481 | + | func buyMaterials (cf,cq) = { | |
482 | + | let ch = aX() | |
483 | + | if ((ch == ch)) | |
520 | 484 | then { | |
521 | - | let | |
522 | - | if ((size( | |
485 | + | let ag = valueOrErrorMessage(getString(S, ad(toString(cb.caller))), "You don't have a duck staked") | |
486 | + | if ((size(cb.payments) != 1)) | |
523 | 487 | then throw("exactly 1 payment must be attached") | |
524 | 488 | else { | |
525 | - | let | |
526 | - | let | |
527 | - | let | |
528 | - | if (( | |
489 | + | let cr = cb.payments[0] | |
490 | + | let cs = cr.amount | |
491 | + | let ct = valueOrErrorMessage(cr.assetId, "WAVES can't be used as payment") | |
492 | + | if ((ct != b)) | |
529 | 493 | then throw("USDT payments only!") | |
530 | 494 | else { | |
531 | - | let | |
532 | - | if (( | |
533 | - | then throw(("Duck location type should be Factory, but is " + | |
495 | + | let ci = split(valueOrElse(getString(S, ah(ag)), l), "_") | |
496 | + | if ((ci[ap] != "F")) | |
497 | + | then throw(("Duck location type should be Factory, but is " + ci[ap])) | |
534 | 498 | else { | |
535 | - | let | |
536 | - | let | |
537 | - | let | |
538 | - | func | |
539 | - | then throw(((("You tried to buy negative amount of " + | |
540 | - | else if (( | |
499 | + | let aG = ci[aq] | |
500 | + | let cj = aV(af(ag)) | |
501 | + | let cu = split(cj[E], "_") | |
502 | + | func cv (aZ,bb) = if ((0 > cf[bb])) | |
503 | + | then throw(((("You tried to buy negative amount of " + o[bb]) + ": ") + toString(cf[bb]))) | |
504 | + | else if ((cf[bb] > 0)) | |
541 | 505 | then { | |
542 | - | let | |
543 | - | $Tuple3(( | |
506 | + | let cm = aN(aG, bb, cf[bb], cq[bb]) | |
507 | + | $Tuple3((aZ._1 :+ cm._1), (aZ._2 :+ toString((parseIntValue(cu[bb]) + cm._3))), (aZ._3 + cm._2)) | |
544 | 508 | } | |
545 | - | else $Tuple3( | |
509 | + | else $Tuple3(aZ._1, (aZ._2 :+ cu[bb]), aZ._3) | |
546 | 510 | ||
547 | - | let | |
548 | - | let | |
549 | - | let | |
550 | - | let | |
551 | - | func | |
552 | - | then | |
553 | - | else | |
511 | + | let cn = { | |
512 | + | let bD = [0, 1, 2, 3, 4, 5] | |
513 | + | let bE = size(bD) | |
514 | + | let bF = $Tuple3(nil, nil, 0) | |
515 | + | func bG (bH,bI) = if ((bI >= bE)) | |
516 | + | then bH | |
517 | + | else cv(bH, bD[bI]) | |
554 | 518 | ||
555 | - | func | |
556 | - | then | |
519 | + | func bJ (bH,bI) = if ((bI >= bE)) | |
520 | + | then bH | |
557 | 521 | else throw("List size exceeds 6") | |
558 | 522 | ||
559 | - | | |
523 | + | bJ(bG(bG(bG(bG(bG(bG(bF, 0), 1), 2), 3), 4), 5), 6) | |
560 | 524 | } | |
561 | - | if (( | |
562 | - | then throw(((("Insufficient payment! Attached=" + toString( | |
525 | + | if ((cn._3 > cs)) | |
526 | + | then throw(((("Insufficient payment! Attached=" + toString(cs)) + ", required=") + toString(cn._3))) | |
563 | 527 | else { | |
564 | - | let | |
565 | - | let | |
566 | - | let | |
567 | - | then [ScriptTransfer( | |
528 | + | let co = makeString([cj[C], cj[D], makeString(cn._2, "_"), cj[F]], ":") | |
529 | + | let cp = au(invoke(S, "updateBackpack", [ag, co], nil)) | |
530 | + | let N = if (((cs - cn._3) > 0)) | |
531 | + | then [ScriptTransfer(cb.caller, (cs - cn._3), b)] | |
568 | 532 | else nil | |
569 | - | let | |
570 | - | $Tuple2((( | |
533 | + | let cw = (cn._3 / 100) | |
534 | + | $Tuple2(((cn._1 ++ N) :+ ScriptTransfer(R, cw, b)), cp) | |
571 | 535 | } | |
572 | 536 | } | |
573 | 537 | } | |
578 | 542 | ||
579 | 543 | ||
580 | 544 | ||
581 | - | @Callable( | |
582 | - | func exchangeResources ( | |
583 | - | let | |
584 | - | if (( | |
545 | + | @Callable(cb) | |
546 | + | func exchangeResources (cf) = { | |
547 | + | let ch = aX() | |
548 | + | if ((ch == ch)) | |
585 | 549 | then { | |
586 | - | let | |
587 | - | if ((size( | |
550 | + | let ag = valueOrErrorMessage(getString(S, ad(toString(cb.caller))), "You don't have a duck staked") | |
551 | + | if ((size(cb.payments) != 1)) | |
588 | 552 | then throw("exactly 1 payment must be attached") | |
589 | 553 | else { | |
590 | - | let | |
591 | - | let | |
592 | - | let | |
593 | - | if (( | |
554 | + | let cr = cb.payments[0] | |
555 | + | let cs = cr.amount | |
556 | + | let ct = valueOrErrorMessage(cr.assetId, "WAVES can't be used as payment") | |
557 | + | if ((ct != b)) | |
594 | 558 | then throw("USDT payments only!") | |
595 | 559 | else { | |
596 | - | let | |
597 | - | if (( | |
598 | - | then throw(("Duck location type should be Factory, but is " + | |
560 | + | let ci = split(valueOrElse(getString(S, ah(ag)), l), "_") | |
561 | + | if ((ci[ap] != "F")) | |
562 | + | then throw(("Duck location type should be Factory, but is " + ci[ap])) | |
599 | 563 | else { | |
600 | - | let | |
601 | - | let | |
602 | - | let | |
603 | - | let | |
604 | - | func | |
605 | - | let | |
606 | - | let | |
607 | - | let | |
608 | - | if (( | |
609 | - | then throw(((((("You have " + | |
610 | - | else if ((0 > | |
611 | - | then throw(((("You tried to exchange negative amount of " + | |
612 | - | else if (( | |
613 | - | then $Tuple4(( | |
614 | - | else $Tuple4(( | |
564 | + | let aG = ci[aq] | |
565 | + | let cj = aV(af(ag)) | |
566 | + | let ck = split(cj[D], "_") | |
567 | + | let cu = split(cj[E], "_") | |
568 | + | func cx (aZ,bb) = { | |
569 | + | let aI = Y(aG, bb) | |
570 | + | let aJ = valueOrElse(getInteger(aI), 0) | |
571 | + | let cy = cf[bb] | |
572 | + | if ((cy > parseIntValue(ck[bb]))) | |
573 | + | then throw(((((("You have " + ck[bb]) + " of ") + n[bb]) + ", but tried to exchange ") + toString(cy))) | |
574 | + | else if ((0 > cy)) | |
575 | + | then throw(((("You tried to exchange negative amount of " + n[bb]) + ": ") + toString(cy))) | |
576 | + | else if ((cy > 0)) | |
577 | + | then $Tuple4((aZ._1 :+ toString((parseIntValue(ck[bb]) - cy))), (aZ._2 :+ toString((parseIntValue(cu[bb]) + cy))), (aZ._3 + fraction(cy, m, h)), (aZ._4 :+ IntegerEntry(aI, aJ))) | |
578 | + | else $Tuple4((aZ._1 :+ ck[bb]), (aZ._2 :+ cu[bb]), aZ._3, aZ._4) | |
615 | 579 | } | |
616 | 580 | ||
617 | - | let | |
618 | - | let | |
619 | - | let | |
620 | - | let | |
621 | - | func | |
622 | - | then | |
623 | - | else | |
581 | + | let cn = { | |
582 | + | let bD = [0, 1, 2, 3, 4, 5] | |
583 | + | let bE = size(bD) | |
584 | + | let bF = $Tuple4(nil, nil, 0, nil) | |
585 | + | func bG (bH,bI) = if ((bI >= bE)) | |
586 | + | then bH | |
587 | + | else cx(bH, bD[bI]) | |
624 | 588 | ||
625 | - | func | |
626 | - | then | |
589 | + | func bJ (bH,bI) = if ((bI >= bE)) | |
590 | + | then bH | |
627 | 591 | else throw("List size exceeds 6") | |
628 | 592 | ||
629 | - | | |
593 | + | bJ(bG(bG(bG(bG(bG(bG(bF, 0), 1), 2), 3), 4), 5), 6) | |
630 | 594 | } | |
631 | - | if (( | |
632 | - | then throw(((("Insufficient payment! Attached=" + toString( | |
595 | + | if ((cn._3 > cs)) | |
596 | + | then throw(((("Insufficient payment! Attached=" + toString(cs)) + ", required=") + toString(cn._3))) | |
633 | 597 | else { | |
634 | - | let | |
635 | - | let | |
636 | - | let | |
637 | - | then [ScriptTransfer( | |
598 | + | let co = makeString([cj[C], makeString(cn._1, "_"), makeString(cn._2, "_"), cj[F]], ":") | |
599 | + | let cp = au(invoke(S, "updateBackpack", [ag, co], nil)) | |
600 | + | let N = if (((cs - cn._3) > 0)) | |
601 | + | then [ScriptTransfer(cb.caller, (cs - cn._3), b)] | |
638 | 602 | else nil | |
639 | - | let | |
640 | - | $Tuple2((( | |
603 | + | let cw = (cn._3 / 100) | |
604 | + | $Tuple2(((N ++ cn._4) :+ ScriptTransfer(R, cw, b)), cp) | |
641 | 605 | } | |
642 | 606 | } | |
643 | 607 | } | |
648 | 612 | ||
649 | 613 | ||
650 | 614 | ||
651 | - | @Callable( | |
652 | - | func craftGoods ( | |
653 | - | let | |
654 | - | if (( | |
655 | - | then if ((size( | |
615 | + | @Callable(cb) | |
616 | + | func craftGoods (cz,cA) = { | |
617 | + | let ch = aX() | |
618 | + | if ((ch == ch)) | |
619 | + | then if ((size(cb.payments) != 1)) | |
656 | 620 | then throw("exactly 1 payment must be attached") | |
657 | 621 | else { | |
658 | - | let | |
659 | - | let | |
660 | - | let | |
661 | - | if (( | |
622 | + | let cr = cb.payments[0] | |
623 | + | let cs = cr.amount | |
624 | + | let ct = valueOrErrorMessage(cr.assetId, "WAVES can't be used as payment") | |
625 | + | if ((ct != b)) | |
662 | 626 | then throw("USDT payments only!") | |
663 | - | else if (( | |
627 | + | else if ((cs != f)) | |
664 | 628 | then throw("exactly 1 USDT must be attached as payment") | |
665 | - | else if ((0 >= | |
629 | + | else if ((0 >= cA)) | |
666 | 630 | then throw("Quantity should be positive") | |
667 | 631 | else { | |
668 | - | let | |
669 | - | let | |
670 | - | if (( | |
671 | - | then throw(("Duck location type should be Manufactory, but is " + | |
632 | + | let ag = valueOrErrorMessage(getString(S, ad(toString(cb.caller))), "You don't have a duck staked") | |
633 | + | let ci = split(valueOrElse(getString(S, ah(ag)), l), "_") | |
634 | + | if ((ci[ap] != "M")) | |
635 | + | then throw(("Duck location type should be Manufactory, but is " + ci[ap])) | |
672 | 636 | else { | |
673 | - | let | |
674 | - | let | |
675 | - | let | |
676 | - | if (if ((0 > | |
637 | + | let cB = ci[ao] | |
638 | + | let cj = aV(af(ag)) | |
639 | + | let cu = split(cj[E], "_") | |
640 | + | if (if ((0 > cz)) | |
677 | 641 | then true | |
678 | - | else ( | |
679 | - | then throw(("Unknown product idx=" + toString( | |
642 | + | else (cz >= size(r))) | |
643 | + | then throw(("Unknown product idx=" + toString(cz))) | |
680 | 644 | else { | |
681 | - | let | |
682 | - | if ((size( | |
683 | - | then throw(("Fatal: unknown recipe: " + | |
645 | + | let cC = split(r[cz], "_") | |
646 | + | if ((size(cC) != (k + 3))) | |
647 | + | then throw(("Fatal: unknown recipe: " + r[cz])) | |
684 | 648 | else { | |
685 | - | let | |
686 | - | if (( | |
687 | - | then throw(((("This product is available in " + | |
649 | + | let cD = parseIntValue(cC[t]) | |
650 | + | if ((q[cD] != cB)) | |
651 | + | then throw(((("This product is available in " + q[cD]) + ", but you are in ") + cB)) | |
688 | 652 | else { | |
689 | - | let | |
653 | + | let cE = if ((cj[F] == "")) | |
690 | 654 | then nil | |
691 | - | else split( | |
692 | - | func | |
693 | - | let | |
694 | - | let | |
695 | - | then | |
655 | + | else split(cj[F], "_") | |
656 | + | func cF (aZ,cG) = { | |
657 | + | let cH = aZ._2 | |
658 | + | let cI = if ((size(cE) > cH)) | |
659 | + | then cE[cH] | |
696 | 660 | else "0" | |
697 | - | let | |
698 | - | let | |
699 | - | let | |
700 | - | then toString(( | |
701 | - | else | |
702 | - | $Tuple2(( | |
661 | + | let cJ = parseIntValue(cI) | |
662 | + | let aB = (cA * parseIntValue(cC[s])) | |
663 | + | let cK = if ((cH == cz)) | |
664 | + | then toString((cJ + aB)) | |
665 | + | else cI | |
666 | + | $Tuple2((aZ._1 :+ cK), (cH + 1)) | |
703 | 667 | } | |
704 | 668 | ||
705 | - | let | |
706 | - | let | |
707 | - | let | |
708 | - | func | |
709 | - | then | |
710 | - | else | |
669 | + | let cL = ( let bD = r | |
670 | + | let bE = size(bD) | |
671 | + | let bF = $Tuple2(nil, 0) | |
672 | + | func bG (bH,bI) = if ((bI >= bE)) | |
673 | + | then bH | |
674 | + | else cF(bH, bD[bI]) | |
711 | 675 | ||
712 | - | func | |
713 | - | then | |
676 | + | func bJ (bH,bI) = if ((bI >= bE)) | |
677 | + | then bH | |
714 | 678 | else throw("List size exceeds 50") | |
715 | 679 | ||
716 | - | | |
717 | - | func | |
718 | - | let | |
719 | - | let | |
720 | - | if (( | |
721 | - | then throw(((((((("You have " + | |
722 | - | else if (( | |
723 | - | then ( | |
724 | - | else ( | |
680 | + | bJ(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bF, 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 | |
681 | + | func cM (aZ,bb) = { | |
682 | + | let cN = ((parseIntValue(cC[bb]) * g) * cA) | |
683 | + | let cO = parseIntValue(cu[bb]) | |
684 | + | if ((cN > cO)) | |
685 | + | then throw(((((((("You have " + cu[bb]) + " of ") + o[bb]) + ", but recipe requires ") + toString(cN)) + " for quantity ") + toString(cA))) | |
686 | + | else if ((cN > 0)) | |
687 | + | then (aZ :+ toString((cO - cN))) | |
688 | + | else (aZ :+ cu[bb]) | |
725 | 689 | } | |
726 | 690 | ||
727 | - | let | |
728 | - | let | |
729 | - | let | |
730 | - | let | |
731 | - | func | |
732 | - | then | |
733 | - | else | |
691 | + | let cn = { | |
692 | + | let bD = [0, 1, 2, 3, 4, 5] | |
693 | + | let bE = size(bD) | |
694 | + | let bF = nil | |
695 | + | func bK (bH,bI) = if ((bI >= bE)) | |
696 | + | then bH | |
697 | + | else cM(bH, bD[bI]) | |
734 | 698 | ||
735 | - | func | |
736 | - | then | |
699 | + | func bL (bH,bI) = if ((bI >= bE)) | |
700 | + | then bH | |
737 | 701 | else throw("List size exceeds 6") | |
738 | 702 | ||
739 | - | | |
703 | + | bL(bK(bK(bK(bK(bK(bK(bF, 0), 1), 2), 3), 4), 5), 6) | |
740 | 704 | } | |
741 | - | let | |
742 | - | let | |
743 | - | $Tuple2(nil, | |
705 | + | let co = makeString([cj[C], cj[D], makeString(cn, "_"), makeString(cL, "_")], ":") | |
706 | + | let cp = au(invoke(S, "updateBackpack", [ag, co], nil)) | |
707 | + | $Tuple2(nil, cp) | |
744 | 708 | } | |
745 | 709 | } | |
746 | 710 | } | |
752 | 716 | ||
753 | 717 | ||
754 | 718 | ||
755 | - | @Callable( | |
756 | - | func setWarehouseOrder ( | |
757 | - | let | |
758 | - | let | |
759 | - | let | |
760 | - | then | |
719 | + | @Callable(cb) | |
720 | + | func setWarehouseOrder (cP,ac) = { | |
721 | + | let cQ = cb.originCaller | |
722 | + | let an = toString(cQ) | |
723 | + | let cp = if ((cQ != R)) | |
724 | + | then aX() | |
761 | 725 | else false | |
762 | - | let | |
763 | - | if (!(isDefined(getInteger( | |
764 | - | then throw((("NFT " + | |
726 | + | let cR = value(assetInfo(fromBase58String(ac))) | |
727 | + | if (!(isDefined(getInteger(S, al(ac))))) | |
728 | + | then throw((("NFT " + cR.name) + " is not staked")) | |
765 | 729 | else { | |
766 | - | let | |
767 | - | if (if (( | |
768 | - | then ( | |
730 | + | let cS = valueOrErrorMessage(getString(S, aj(ac)), (("NFT " + cR.name) + " is orphaned")) | |
731 | + | if (if ((cQ != R)) | |
732 | + | then (cS != an) | |
769 | 733 | else false) | |
770 | - | then throw(( | |
734 | + | then throw((j + " is not yours")) | |
771 | 735 | else { | |
772 | - | let dm = split_4C(di, ":") | |
773 | - | let cv = aO(invoke(z, "getWarehouseREADONLY", [aj], nil)) | |
774 | - | let bK = split_4C(cv, ":") | |
775 | - | let dn = split(bK[aG], "_") | |
776 | - | let do = parseIntValue(dn[aI]) | |
777 | - | let dp = parseIntValue(dn[aK]) | |
778 | - | let aS = ai(aj) | |
779 | - | let bL = aR(aS) | |
780 | - | let cw = bJ(bK, bL, dm) | |
781 | - | let dq = cw._4 | |
782 | - | let dr = cw._5 | |
783 | - | let ds = (dq + dr) | |
784 | - | let dt = ((dp - do) - ds) | |
785 | - | if ((dq > dt)) | |
786 | - | then throw((((("Attempt to reserve " + toString(dq)) + " space for buy orders, but only ") + toString(dt)) + " warehouse empty space left")) | |
787 | - | else if ((dr > do)) | |
788 | - | then throw((((("Attempt to lock " + toString(dr)) + " space for sell orders, but only ") + toString(do)) + " warehouse space occupied")) | |
789 | - | else { | |
790 | - | let du = makeString_2C([bK[aC], makeString(cw._1, "_"), makeString(cw._2, "_"), makeString(cw._3, "_"), toString(ds)], ":") | |
791 | - | let dv = invoke(z, "saveWarehouse", [du, aj], nil) | |
792 | - | if ((dv == dv)) | |
793 | - | then { | |
794 | - | let dw = cw._6 | |
795 | - | let dx = if ((dw > 0)) | |
796 | - | then if ((size(cu.payments) != 1)) | |
797 | - | then throw("exactly 1 payment must be attached") | |
798 | - | else { | |
799 | - | let cK = cu.payments[0] | |
800 | - | let cL = cK.amount | |
801 | - | let cM = valueOrErrorMessage(cK.assetId, "WAVES can't be used as payment") | |
802 | - | if ((cM != g)) | |
803 | - | then throw("USDT payments only!") | |
804 | - | else if ((cL != dw)) | |
805 | - | then throw(("Payment needed is " + toString(dw))) | |
806 | - | else [StringEntry(aS, di)] | |
807 | - | } | |
808 | - | else if ((dw == 0)) | |
809 | - | then if ((size(cu.payments) != 0)) | |
810 | - | then throw("No payments needed") | |
811 | - | else [StringEntry(aS, di)] | |
812 | - | else if ((size(cu.payments) != 0)) | |
813 | - | then throw("No payments needed") | |
814 | - | else [ScriptTransfer(addressFromStringValue(dl), -(dw), g), StringEntry(aS, di)] | |
815 | - | $Tuple2(dx, cI) | |
736 | + | let cT = split_4C(cP, ":") | |
737 | + | let cc = au(invoke(S, "getWarehouseREADONLY", [ac], nil)) | |
738 | + | let bq = split_4C(cc, ":") | |
739 | + | let cU = split(bq[y], "_") | |
740 | + | let cV = parseIntValue(cU[A]) | |
741 | + | let cW = parseIntValue(cU[B]) | |
742 | + | let ay = ab(ac) | |
743 | + | let br = ax(ay) | |
744 | + | let cd = bp(bq, br, cT) | |
745 | + | let cX = cd._4 | |
746 | + | let cY = cd._5 | |
747 | + | let cZ = (cX + cY) | |
748 | + | let da = ((cW - cV) - cZ) | |
749 | + | if ((0 > da)) | |
750 | + | then throw((((("Attempt to reserve " + toString(cX)) + " space for buy orders, and ") + toString(cY)) + " space for sell orders, leads to negative free space")) | |
751 | + | else { | |
752 | + | let db = makeString_2C([bq[u], makeString(cd._1, "_"), makeString(cd._2, "_"), makeString(cd._3, "_"), toString(cZ)], ":") | |
753 | + | let dc = au(invoke(S, "saveWarehouse", [db, ac], nil)) | |
754 | + | let dd = cd._6 | |
755 | + | let de = if ((dd > 0)) | |
756 | + | then if ((size(cb.payments) != 1)) | |
757 | + | then throw("exactly 1 payment must be attached") | |
758 | + | else { | |
759 | + | let cr = cb.payments[0] | |
760 | + | let cs = cr.amount | |
761 | + | let ct = valueOrErrorMessage(cr.assetId, "WAVES can't be used as payment") | |
762 | + | if ((ct != b)) | |
763 | + | then throw("USDT payments only!") | |
764 | + | else if ((cs != dd)) | |
765 | + | then throw(("Payment needed is " + toString(dd))) | |
766 | + | else [StringEntry(ay, cP)] | |
816 | 767 | } | |
817 | - | else throw("Strict value is not equal to itself.") | |
818 | - | } | |
768 | + | else if ((dd == 0)) | |
769 | + | then if ((size(cb.payments) != 0)) | |
770 | + | then throw("No payments needed") | |
771 | + | else [StringEntry(ay, cP)] | |
772 | + | else if ((size(cb.payments) != 0)) | |
773 | + | then throw("No payments needed") | |
774 | + | else [ScriptTransfer(addressFromStringValue(cS), -(dd), b), StringEntry(ay, cP)] | |
775 | + | $Tuple2(de, $Tuple2(cp, dc)) | |
776 | + | } | |
819 | 777 | } | |
820 | 778 | } | |
821 | 779 | } | |
822 | 780 | ||
823 | 781 | ||
824 | 782 | ||
825 | - | @Callable(cu) | |
826 | - | func acceptWarehouseOrder (dy,aj,an) = { | |
827 | - | let cA = br() | |
828 | - | if ((cA == cA)) | |
829 | - | then { | |
830 | - | let dz = cu.originCaller | |
831 | - | let dA = toString(dz) | |
832 | - | let dB = valueOrErrorMessage(getString(z, ak(dA)), "You don't have a duck staked") | |
833 | - | let cB = valueOrElse(getString(z, ao(dB)), A) | |
834 | - | let dC = split(value(cB), "_") | |
835 | - | if ((dC[aw] != "L")) | |
836 | - | then throw((("Duck location type is " + dC[aw]) + ", but should be L")) | |
837 | - | else if ((dB != an)) | |
838 | - | then throw(((("Your staked duck is " + dB) + ", but passed ") + an)) | |
783 | + | @Callable(cb) | |
784 | + | func acceptWarehouseOrder (df,ac,ag) = { | |
785 | + | let ch = aX() | |
786 | + | let dg = cb.originCaller | |
787 | + | let dh = toString(dg) | |
788 | + | let di = valueOrErrorMessage(getString(S, ad(dh)), "You don't have a duck staked") | |
789 | + | let ci = valueOrElse(getString(S, ah(di)), l) | |
790 | + | let dj = split(value(ci), "_") | |
791 | + | if ((dj[ap] != "L")) | |
792 | + | then throw((("Duck location type is " + dj[ap]) + ", but should be L")) | |
793 | + | else if ((di != ag)) | |
794 | + | then throw(((("Your staked duck is " + di) + ", but passed ") + ag)) | |
795 | + | else { | |
796 | + | let dk = value(assetInfo(fromBase58String(ac))) | |
797 | + | if (!(isDefined(getInteger(S, al(ac))))) | |
798 | + | then throw((("NFT " + dk.name) + " is not staked")) | |
839 | 799 | else { | |
840 | - | let | |
841 | - | if ( | |
842 | - | then throw( | |
800 | + | let dl = valueOrErrorMessage(getString(S, aj(ac)), (("NFT " + dk.name) + " is orphaned")) | |
801 | + | if ((dl == dh)) | |
802 | + | then throw("You cannot trade with yourself") | |
843 | 803 | else { | |
844 | - | let | |
845 | - | if (( | |
846 | - | then throw(" | |
804 | + | let dm = split_4C(df, ":") | |
805 | + | if ((size(dm) != 3)) | |
806 | + | then throw("bpOrderStr should contain exactly 2 ':' separators") | |
847 | 807 | else { | |
848 | - | let dF = split_4C(dy, ":") | |
849 | - | if ((size(dF) != 3)) | |
850 | - | then throw("bpOrderStr should contain exactly 2 ':' separators") | |
851 | - | else { | |
852 | - | let dG = split(dF[0], "_") | |
853 | - | let dH = split(dF[1], "_") | |
854 | - | let dI = if ((dF[2] == "")) | |
855 | - | then nil | |
856 | - | else split(dF[2], "_") | |
857 | - | if ((size(dG) != B)) | |
858 | - | then throw("All 6 resources should be passed") | |
859 | - | else if ((size(dH) != B)) | |
860 | - | then throw("All 6 materials should be passed") | |
861 | - | else { | |
862 | - | let cv = aO(invoke(z, "getWarehouseREADONLY", [aj], nil)) | |
863 | - | let bK = split_4C(cv, ":") | |
864 | - | let bN = split(bK[aD], "_") | |
865 | - | let bO = split(bK[aE], "_") | |
866 | - | let bP = if ((bK[aF] == "")) | |
867 | - | then nil | |
868 | - | else split(bK[aF], "_") | |
869 | - | let dJ = parseIntValue(split(bK[aG], "_")[aH]) | |
870 | - | let bq = am(an) | |
871 | - | let cC = bp(bq) | |
872 | - | let dK = split(cC[az], "_") | |
873 | - | let dL = split(cC[aA], "_") | |
874 | - | let dM = if ((cC[aB] == "")) | |
875 | - | then nil | |
876 | - | else split(cC[aB], "_") | |
877 | - | let aS = ai(aj) | |
878 | - | let dN = aR(aS) | |
879 | - | let dO = split(dN[aL], "_") | |
880 | - | let dP = split(dN[aM], "_") | |
881 | - | let dQ = if ((dN[aN] == "")) | |
882 | - | then nil | |
883 | - | else split(dN[aN], "_") | |
884 | - | let bW = { | |
885 | - | let bX = dG | |
886 | - | let bY = size(bX) | |
887 | - | let bZ = $Tuple12(nil, nil, nil, 0, 0, 0, 0, dK, bN, dO, M, false) | |
888 | - | func ca (cb,cc) = if ((cc >= bY)) | |
889 | - | then cb | |
890 | - | else ci(cb, bX[cc]) | |
808 | + | let dn = split(dm[0], "_") | |
809 | + | let do = split(dm[1], "_") | |
810 | + | let dp = if ((dm[2] == "")) | |
811 | + | then nil | |
812 | + | else split(dm[2], "_") | |
813 | + | if ((size(dn) != k)) | |
814 | + | then throw("All 6 resources should be passed") | |
815 | + | else if ((size(do) != k)) | |
816 | + | then throw("All 6 materials should be passed") | |
817 | + | else { | |
818 | + | let cc = au(invoke(S, "getWarehouseREADONLY", [ac], nil)) | |
819 | + | let bq = split_4C(cc, ":") | |
820 | + | let bt = split(bq[v], "_") | |
821 | + | let bu = split(bq[w], "_") | |
822 | + | let bv = if ((bq[x] == "")) | |
823 | + | then nil | |
824 | + | else split(bq[x], "_") | |
825 | + | let dq = parseIntValue(split(bq[y], "_")[z]) | |
826 | + | let aW = af(ag) | |
827 | + | let cj = aV(aW) | |
828 | + | let dr = split(cj[D], "_") | |
829 | + | let ds = split(cj[E], "_") | |
830 | + | let dt = if ((cj[F] == "")) | |
831 | + | then nil | |
832 | + | else split(cj[F], "_") | |
833 | + | let ay = ab(ac) | |
834 | + | let du = ax(ay) | |
835 | + | let dv = split(du[ar], "_") | |
836 | + | let dw = split(du[as], "_") | |
837 | + | let dx = if ((du[at] == "")) | |
838 | + | then nil | |
839 | + | else split(du[at], "_") | |
840 | + | let bC = { | |
841 | + | let bD = dn | |
842 | + | let bE = size(bD) | |
843 | + | let bF = $Tuple12(nil, nil, nil, 0, 0, 0, 0, dr, bt, dv, n, false) | |
844 | + | func bG (bH,bI) = if ((bI >= bE)) | |
845 | + | then bH | |
846 | + | else bO(bH, bD[bI]) | |
891 | 847 | ||
892 | - | ||
893 | - | ||
894 | - | ||
848 | + | func bJ (bH,bI) = if ((bI >= bE)) | |
849 | + | then bH | |
850 | + | else throw("List size exceeds 6") | |
895 | 851 | ||
896 | - | cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6) | |
852 | + | bJ(bG(bG(bG(bG(bG(bG(bF, 0), 1), 2), 3), 4), 5), 6) | |
853 | + | } | |
854 | + | let aS = { | |
855 | + | let bD = do | |
856 | + | let bE = size(bD) | |
857 | + | let bF = $Tuple12(nil, nil, nil, bC._4, bC._5, bC._6, 0, ds, bu, dw, o, false) | |
858 | + | func bK (bH,bI) = if ((bI >= bE)) | |
859 | + | then bH | |
860 | + | else bO(bH, bD[bI]) | |
861 | + | ||
862 | + | func bL (bH,bI) = if ((bI >= bE)) | |
863 | + | then bH | |
864 | + | else throw("List size exceeds 6") | |
865 | + | ||
866 | + | bL(bK(bK(bK(bK(bK(bK(bF, 0), 1), 2), 3), 4), 5), 6) | |
867 | + | } | |
868 | + | let az = if ((size(dp) != 0)) | |
869 | + | then { | |
870 | + | let bD = dp | |
871 | + | let bE = size(bD) | |
872 | + | let bF = $Tuple12(nil, nil, nil, aS._4, aS._5, aS._6, 0, dt, bv, dx, p, true) | |
873 | + | func bM (bH,bI) = if ((bI >= bE)) | |
874 | + | then bH | |
875 | + | else bO(bH, bD[bI]) | |
876 | + | ||
877 | + | func bN (bH,bI) = if ((bI >= bE)) | |
878 | + | then bH | |
879 | + | else throw("List size exceeds 50") | |
880 | + | ||
881 | + | bN(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bF, 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) | |
882 | + | } | |
883 | + | else $Tuple12(bv, dx, dt, aS._4, aS._5, aS._6, 0, dt, bv, dx, p, true) | |
884 | + | let dy = az._4 | |
885 | + | let dz = if ((0 > (dq - dy))) | |
886 | + | then 0 | |
887 | + | else (dq - dy) | |
888 | + | let db = makeString_2C([bq[u], makeString(bC._1, "_"), makeString(aS._1, "_"), makeString(az._1, "_"), toString(dz)], ":") | |
889 | + | let dA = makeString_2C([makeString(bC._2, "_"), makeString(aS._2, "_"), makeString(az._2, "_")], ":") | |
890 | + | let dB = makeString_2C([cj[C], makeString(bC._3, "_"), makeString(aS._3, "_"), makeString(az._3, "_")], ":") | |
891 | + | let dc = au(invoke(S, "saveWarehouse", [db, ac], nil)) | |
892 | + | let dC = au(invoke(S, "updateBackpack", [ag, dB], nil)) | |
893 | + | let de = [StringEntry(ay, dA)] | |
894 | + | let dD = az._5 | |
895 | + | let dE = if ((dD > 0)) | |
896 | + | then { | |
897 | + | let dF = fraction(az._5, W, f) | |
898 | + | let dG = am(dh) | |
899 | + | let dH = getString(S, dG) | |
900 | + | if (isDefined(dH)) | |
901 | + | then (((de :+ ScriptTransfer(dg, (az._5 - (3 * dF)), b)) :+ ScriptTransfer(R, dF, b)) :+ ScriptTransfer(addressFromStringValue(value(dH)), dF, b)) | |
902 | + | else ((de :+ ScriptTransfer(dg, (az._5 - (3 * dF)), b)) :+ ScriptTransfer(R, dF, b)) | |
903 | + | } | |
904 | + | else de | |
905 | + | let dI = az._6 | |
906 | + | let dJ = if ((dI > 0)) | |
907 | + | then if ((size(cb.payments) != 1)) | |
908 | + | then throw("exactly 1 payment must be attached") | |
909 | + | else { | |
910 | + | let cr = cb.payments[0] | |
911 | + | let cs = cr.amount | |
912 | + | let ct = valueOrErrorMessage(cr.assetId, "WAVES can't be used as payment") | |
913 | + | if ((ct != b)) | |
914 | + | then throw("USDT payments only!") | |
915 | + | else if ((cs != dI)) | |
916 | + | then throw(("Payment needed is " + toString(dI))) | |
917 | + | else if ((X > cs)) | |
918 | + | then throw(("Payment should be at least " + toString(X))) | |
919 | + | else { | |
920 | + | let dK = fraction(az._6, W, f) | |
921 | + | let dG = am(dl) | |
922 | + | let dH = getString(S, dG) | |
923 | + | if (isDefined(dH)) | |
924 | + | then (((dE :+ ScriptTransfer(addressFromStringValue(dl), (az._6 - (3 * dK)), b)) :+ ScriptTransfer(R, dK, b)) :+ ScriptTransfer(addressFromStringValue(value(dH)), dK, b)) | |
925 | + | else ((dE :+ ScriptTransfer(addressFromStringValue(dl), (az._6 - (3 * dK)), b)) :+ ScriptTransfer(R, dK, b)) | |
926 | + | } | |
897 | 927 | } | |
898 | - | let bm = { | |
899 | - | let bX = dH | |
900 | - | let bY = size(bX) | |
901 | - | let bZ = $Tuple12(nil, nil, nil, bW._4, bW._5, bW._6, 0, dL, bO, dP, N, false) | |
902 | - | func ce (cb,cc) = if ((cc >= bY)) | |
903 | - | then cb | |
904 | - | else ci(cb, bX[cc]) | |
905 | - | ||
906 | - | func cf (cb,cc) = if ((cc >= bY)) | |
907 | - | then cb | |
908 | - | else throw("List size exceeds 6") | |
909 | - | ||
910 | - | cf(ce(ce(ce(ce(ce(ce(bZ, 0), 1), 2), 3), 4), 5), 6) | |
911 | - | } | |
912 | - | let aT = if ((size(dI) != 0)) | |
913 | - | then { | |
914 | - | let bX = dI | |
915 | - | let bY = size(bX) | |
916 | - | let bZ = $Tuple12(nil, nil, nil, bm._4, bm._5, bm._6, 0, dM, bP, dQ, O, true) | |
917 | - | func cg (cb,cc) = if ((cc >= bY)) | |
918 | - | then cb | |
919 | - | else ci(cb, bX[cc]) | |
920 | - | ||
921 | - | func ch (cb,cc) = if ((cc >= bY)) | |
922 | - | then cb | |
923 | - | else throw("List size exceeds 50") | |
924 | - | ||
925 | - | ch(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(bZ, 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) | |
926 | - | } | |
927 | - | else $Tuple12(bP, dQ, dM, bm._4, bm._5, bm._6, 0, dM, bP, dQ, O, true) | |
928 | - | let dR = aT._4 | |
929 | - | let dS = if ((0 > (dJ - dR))) | |
930 | - | then 0 | |
931 | - | else (dJ - dR) | |
932 | - | let du = makeString_2C([bK[aC], makeString(bW._1, "_"), makeString(bm._1, "_"), makeString(aT._1, "_"), toString(dS)], ":") | |
933 | - | let dT = makeString_2C([makeString(bW._2, "_"), makeString(bm._2, "_"), makeString(aT._2, "_")], ":") | |
934 | - | let dU = makeString_2C([cC[ay], makeString(bW._3, "_"), makeString(bm._3, "_"), makeString(aT._3, "_")], ":") | |
935 | - | let dv = invoke(z, "saveWarehouse", [du, aj], nil) | |
936 | - | if ((dv == dv)) | |
937 | - | then { | |
938 | - | let dV = invoke(z, "updateBackpack", [an, dU], nil) | |
939 | - | if ((dV == dV)) | |
940 | - | then { | |
941 | - | let dx = [StringEntry(aS, dT)] | |
942 | - | let dW = aT._5 | |
943 | - | let dX = if ((dW > 0)) | |
944 | - | then { | |
945 | - | let dY = fraction(aT._5, K, b) | |
946 | - | let dZ = at(dA) | |
947 | - | let ea = getString(z, dZ) | |
948 | - | if (isDefined(ea)) | |
949 | - | then (((dx :+ ScriptTransfer(dz, (aT._5 - (3 * dY)), g)) :+ ScriptTransfer(y, dY, g)) :+ ScriptTransfer(addressFromStringValue(value(ea)), dY, g)) | |
950 | - | else ((dx :+ ScriptTransfer(dz, (aT._5 - (3 * dY)), g)) :+ ScriptTransfer(y, dY, g)) | |
951 | - | } | |
952 | - | else dx | |
953 | - | let eb = aT._6 | |
954 | - | if ((eb > 0)) | |
955 | - | then if ((size(cu.payments) != 1)) | |
956 | - | then throw("exactly 1 payment must be attached") | |
957 | - | else { | |
958 | - | let cK = cu.payments[0] | |
959 | - | let cL = cK.amount | |
960 | - | let cM = valueOrErrorMessage(cK.assetId, "WAVES can't be used as payment") | |
961 | - | if ((cM != g)) | |
962 | - | then throw("USDT payments only!") | |
963 | - | else if ((cL != eb)) | |
964 | - | then throw(("Payment needed is " + toString(eb))) | |
965 | - | else if ((L > cL)) | |
966 | - | then throw(("Payment should be at least " + toString(L))) | |
967 | - | else { | |
968 | - | let ec = fraction(aT._6, K, b) | |
969 | - | let dZ = at(dE) | |
970 | - | let ea = getString(z, dZ) | |
971 | - | if (isDefined(ea)) | |
972 | - | then (((dX :+ ScriptTransfer(addressFromStringValue(dE), (aT._6 - (3 * ec)), g)) :+ ScriptTransfer(y, ec, g)) :+ ScriptTransfer(addressFromStringValue(value(ea)), ec, g)) | |
973 | - | else ((dX :+ ScriptTransfer(addressFromStringValue(dE), (aT._6 - (3 * ec)), g)) :+ ScriptTransfer(y, ec, g)) | |
974 | - | } | |
975 | - | } | |
976 | - | else if ((size(cu.payments) != 0)) | |
977 | - | then throw("No payments needed") | |
978 | - | else dX | |
979 | - | } | |
980 | - | else throw("Strict value is not equal to itself.") | |
981 | - | } | |
982 | - | else throw("Strict value is not equal to itself.") | |
983 | - | } | |
984 | - | } | |
928 | + | else if ((size(cb.payments) != 0)) | |
929 | + | then throw("No payments needed") | |
930 | + | else dE | |
931 | + | $Tuple2(dJ, $Tuple3(ch, dc, dC)) | |
932 | + | } | |
985 | 933 | } | |
986 | 934 | } | |
987 | 935 | } | |
988 | - | } | |
989 | - | else throw("Strict value is not equal to itself.") | |
936 | + | } | |
990 | 937 | } | |
991 | 938 | ||
992 | 939 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let a = | |
4 | + | let a = take(drop(this.bytes, 1), 1) | |
5 | 5 | ||
6 | - | let b = 1000000 | |
7 | - | ||
8 | - | let c = 10000000 | |
9 | - | ||
10 | - | let d = 100000000 | |
11 | - | ||
12 | - | let e = 10000000000 | |
13 | - | ||
14 | - | let f = take(drop(this.bytes, 1), 1) | |
15 | - | ||
16 | - | let g = { | |
17 | - | let h = f | |
18 | - | if ((base58'2W' == h)) | |
6 | + | let b = { | |
7 | + | let c = a | |
8 | + | if ((base58'2W' == c)) | |
19 | 9 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
20 | - | else if ((base58'2T' == | |
10 | + | else if ((base58'2T' == c)) | |
21 | 11 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
22 | 12 | else throw("Unknown chain") | |
23 | 13 | } | |
24 | 14 | ||
25 | - | let | |
26 | - | let | |
27 | - | if ((base58'2W' == | |
15 | + | let d = { | |
16 | + | let c = a | |
17 | + | if ((base58'2W' == c)) | |
28 | 18 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
29 | - | else if ((base58'2T' == | |
19 | + | else if ((base58'2T' == c)) | |
30 | 20 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
31 | 21 | else throw("Unknown chain") | |
32 | 22 | } | |
33 | 23 | ||
34 | - | func j (k,l) = valueOrErrorMessage(getString(k, l), makeString(["mandatory ", toString(k), ".", l, " is not defined"], "")) | |
24 | + | let e = "__" | |
25 | + | ||
26 | + | let f = 1000000 | |
27 | + | ||
28 | + | let g = 10000000 | |
29 | + | ||
30 | + | let h = 100000000 | |
31 | + | ||
32 | + | let i = 10000000000 | |
33 | + | ||
34 | + | let j = "LAND" | |
35 | + | ||
36 | + | let k = 6 | |
37 | + | ||
38 | + | let l = "Africa_F_Africa" | |
39 | + | ||
40 | + | let m = 39637 | |
41 | + | ||
42 | + | let n = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"] | |
43 | + | ||
44 | + | let o = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
45 | + | ||
46 | + | let p = ["First Aid Kit", "Backpack", "Food Ration", "Jet Pack", "Shield"] | |
47 | + | ||
48 | + | let q = ["Asia", "Europe", "Americas", "Oceania", "Africa"] | |
49 | + | ||
50 | + | let r = ["1_1_1_2_2_5_1_10_0", "2_2_2_4_4_10_1_10_0", "3_3_3_6_6_15_1_10_0", "2_5_5_2_7_5_2_100_1", "4_10_10_4_14_10_2_100_1", "6_15_15_6_21_15_2_100_1", "1_1_1_1_1_8_1_10_2", "2_2_2_2_2_16_1_10_2", "3_3_3_3_3_24_1_10_2", "9_9_1_5_5_1_5_100_3", "18_18_2_10_10_2_5_100_3", "27_27_3_15_15_3_5_100_3", "2_2_1_2_2_2_1_10_4", "4_4_2_4_4_4_1_10_4", "6_6_3_6_6_6_1_10_4"] | |
51 | + | ||
52 | + | let s = 7 | |
53 | + | ||
54 | + | let t = 8 | |
55 | + | ||
56 | + | let u = 0 | |
57 | + | ||
58 | + | let v = 1 | |
59 | + | ||
60 | + | let w = 2 | |
61 | + | ||
62 | + | let x = 3 | |
63 | + | ||
64 | + | let y = 4 | |
65 | + | ||
66 | + | let z = 0 | |
67 | + | ||
68 | + | let A = 1 | |
69 | + | ||
70 | + | let B = 3 | |
71 | + | ||
72 | + | let C = 0 | |
73 | + | ||
74 | + | let D = 1 | |
75 | + | ||
76 | + | let E = 2 | |
77 | + | ||
78 | + | let F = 3 | |
79 | + | ||
80 | + | func G (H,I) = valueOrErrorMessage(getString(H, I), makeString(["mandatory ", toString(H), ".", I, " is not defined"], "")) | |
35 | 81 | ||
36 | 82 | ||
37 | - | func m (l,n) = valueOrElse(getInteger(this, l), n) | |
83 | + | let J = 1 | |
84 | + | ||
85 | + | func K () = "%s__restConfig" | |
38 | 86 | ||
39 | 87 | ||
40 | - | let o = 1 | |
41 | - | ||
42 | - | let p = 2 | |
43 | - | ||
44 | - | let q = 3 | |
45 | - | ||
46 | - | func r () = "%s__restConfig" | |
88 | + | func L () = "%s__restAddr" | |
47 | 89 | ||
48 | 90 | ||
49 | - | func | |
91 | + | func M (N) = split_4C(G(N, K()), e) | |
50 | 92 | ||
51 | 93 | ||
52 | - | func | |
94 | + | func O (P,Q) = valueOrErrorMessage(addressFromString(P[Q]), ("Rest cfg doesn't contain address at index " + toString(Q))) | |
53 | 95 | ||
54 | 96 | ||
55 | - | func v (w,x) = valueOrErrorMessage(addressFromString(w[x]), ("Rest cfg doesn't contain address at index " + toString(x))) | |
97 | + | let R = addressFromStringValue(valueOrElse(getString(this, L()), d)) | |
98 | + | ||
99 | + | let P = M(R) | |
100 | + | ||
101 | + | let S = O(P, J) | |
102 | + | ||
103 | + | let T = 10000000000 | |
104 | + | ||
105 | + | let U = 200 | |
106 | + | ||
107 | + | let V = 300 | |
108 | + | ||
109 | + | let W = 10000 | |
110 | + | ||
111 | + | let X = 100000 | |
112 | + | ||
113 | + | func Y (Z,aa) = ((("factoryWhByContinentAndRes_" + Z) + "_") + toString(aa)) | |
56 | 114 | ||
57 | 115 | ||
58 | - | let y = addressFromStringValue(valueOrElse(getString(this, s()), i)) | |
59 | - | ||
60 | - | let w = t(y) | |
61 | - | ||
62 | - | let z = v(w, o) | |
63 | - | ||
64 | - | let A = "Africa_F_Africa" | |
65 | - | ||
66 | - | let B = 6 | |
67 | - | ||
68 | - | let C = 10000000000 | |
69 | - | ||
70 | - | let D = 39637 | |
71 | - | ||
72 | - | let E = 10000 | |
73 | - | ||
74 | - | let F = 200 | |
75 | - | ||
76 | - | let G = 300 | |
77 | - | ||
78 | - | let H = "LAND" | |
79 | - | ||
80 | - | let I = "DUCK" | |
81 | - | ||
82 | - | let J = 10000000000 | |
83 | - | ||
84 | - | let K = 10000 | |
85 | - | ||
86 | - | let L = 100000 | |
87 | - | ||
88 | - | let M = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"] | |
89 | - | ||
90 | - | let N = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
91 | - | ||
92 | - | let O = ["First Aid Kit", "Backpack", "Food Ration", "Jet Pack", "Shield"] | |
93 | - | ||
94 | - | let P = ["Americas", "Europe", "Asia", "Africa", "Oceania"] | |
95 | - | ||
96 | - | let Q = ["1_1_1_2_2_5_1_10_0", "2_2_2_4_4_10_1_10_0", "3_3_3_6_6_15_1_10_0", "2_5_5_2_7_5_2_100_1", "4_10_10_4_14_10_2_100_1", "6_15_15_6_21_15_2_100_1", "1_1_1_1_1_8_1_10_2", "2_2_2_2_2_16_1_10_2", "3_3_3_3_3_24_1_10_2", "9_9_1_5_5_1_5_100_3", "18_18_2_10_10_2_5_100_3", "27_27_3_15_15_3_5_100_3", "2_2_1_2_2_2_1_10_4", "4_4_2_4_4_4_1_10_4", "6_6_3_6_6_6_1_10_4"] | |
97 | - | ||
98 | - | let R = 0 | |
99 | - | ||
100 | - | let S = 1 | |
101 | - | ||
102 | - | let T = 2 | |
103 | - | ||
104 | - | let U = 3 | |
105 | - | ||
106 | - | let V = 4 | |
107 | - | ||
108 | - | let W = 0 | |
109 | - | ||
110 | - | let X = 1 | |
111 | - | ||
112 | - | let Y = 2 | |
113 | - | ||
114 | - | let Z = 3 | |
115 | - | ||
116 | - | let aa = 4 | |
117 | - | ||
118 | - | let ab = 5 | |
119 | - | ||
120 | - | let ac = 6 | |
121 | - | ||
122 | - | let ad = 7 | |
123 | - | ||
124 | - | let ae = 8 | |
125 | - | ||
126 | - | func af (ag,ah) = ((("factoryWhByContinentAndRes_" + ag) + "_") + toString(ah)) | |
116 | + | func ab (ac) = ("landOrder_" + ac) | |
127 | 117 | ||
128 | 118 | ||
129 | - | func | |
119 | + | func ad (ae) = ("stakedDuckByOwner_" + ae) | |
130 | 120 | ||
131 | 121 | ||
132 | - | func | |
122 | + | func af (ag) = ("backPack_" + ag) | |
133 | 123 | ||
134 | 124 | ||
135 | - | func | |
125 | + | func ah (ag) = ("duckLocation_" + ag) | |
136 | 126 | ||
137 | 127 | ||
138 | - | func | |
128 | + | func ai () = "contractsBlocked" | |
139 | 129 | ||
140 | 130 | ||
141 | - | func | |
131 | + | func aj (ak) = ("nftOwner_" + ak) | |
142 | 132 | ||
143 | 133 | ||
144 | - | func | |
134 | + | func al (ak) = ("stakedTime_" + ak) | |
145 | 135 | ||
146 | 136 | ||
147 | - | func | |
137 | + | func am (an) = ("accRefBy_" + an) | |
148 | 138 | ||
149 | 139 | ||
150 | - | ||
140 | + | let ao = 0 | |
151 | 141 | ||
142 | + | let ap = 1 | |
152 | 143 | ||
153 | - | let | |
144 | + | let aq = 2 | |
154 | 145 | ||
155 | - | let | |
146 | + | let ar = 0 | |
156 | 147 | ||
157 | - | let | |
148 | + | let as = 1 | |
158 | 149 | ||
159 | - | let | |
150 | + | let at = 2 | |
160 | 151 | ||
161 | - | let az = 1 | |
162 | - | ||
163 | - | let aA = 2 | |
164 | - | ||
165 | - | let aB = 3 | |
166 | - | ||
167 | - | let aC = 0 | |
168 | - | ||
169 | - | let aD = 1 | |
170 | - | ||
171 | - | let aE = 2 | |
172 | - | ||
173 | - | let aF = 3 | |
174 | - | ||
175 | - | let aG = 4 | |
176 | - | ||
177 | - | let aH = 0 | |
178 | - | ||
179 | - | let aI = 1 | |
180 | - | ||
181 | - | let aJ = 2 | |
182 | - | ||
183 | - | let aK = 3 | |
184 | - | ||
185 | - | let aL = 0 | |
186 | - | ||
187 | - | let aM = 1 | |
188 | - | ||
189 | - | let aN = 2 | |
190 | - | ||
191 | - | func aO (aP) = { | |
192 | - | let h = aP | |
193 | - | if ($isInstanceOf(h, "String")) | |
152 | + | func au (av) = { | |
153 | + | let c = av | |
154 | + | if ($isInstanceOf(c, "String")) | |
194 | 155 | then { | |
195 | - | let | |
196 | - | | |
156 | + | let aw = c | |
157 | + | aw | |
197 | 158 | } | |
198 | 159 | else throw("fail to cast into String") | |
199 | 160 | } | |
200 | 161 | ||
201 | 162 | ||
202 | - | func | |
203 | - | let | |
204 | - | [if ((size(split( | |
205 | - | then | |
206 | - | else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split( | |
207 | - | then | |
208 | - | else "0@0_0@0_0@0_0@0_0@0_0@0", | |
163 | + | func ax (ay) = { | |
164 | + | let az = split(valueOrElse(getString(ay), "0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:"), ":") | |
165 | + | [if ((size(split(az[ar], "_")) == k)) | |
166 | + | then az[ar] | |
167 | + | else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split(az[as], "_")) == k)) | |
168 | + | then az[as] | |
169 | + | else "0@0_0@0_0@0_0@0_0@0_0@0", az[at]] | |
209 | 170 | } | |
210 | 171 | ||
211 | 172 | ||
212 | - | func | |
173 | + | func aA (aB,aC,aD) = if (aD) | |
213 | 174 | then { | |
214 | - | let | |
215 | - | then ((( | |
216 | - | else -((((-( | |
217 | - | ( | |
175 | + | let aE = if ((aB >= 0)) | |
176 | + | then (((aB + aC) - 1) / aC) | |
177 | + | else -((((-(aB) + aC) - 1) / aC)) | |
178 | + | (aE * h) | |
218 | 179 | } | |
219 | - | else | |
180 | + | else aB | |
220 | 181 | ||
221 | 182 | ||
222 | - | func | |
223 | - | let | |
224 | - | let | |
225 | - | let | |
183 | + | func aF (aG,aa,aB,aH) = { | |
184 | + | let aI = Y(aG, aa) | |
185 | + | let aJ = valueOrElse(getInteger(aI), 0) | |
186 | + | let aK = if ((aJ > T)) | |
226 | 187 | then 0 | |
227 | - | else if ((( | |
228 | - | then ( | |
229 | - | else | |
230 | - | let | |
231 | - | let | |
232 | - | if ((( | |
233 | - | then throw((((((((((("Actual price = " + toString( | |
234 | - | else $Tuple2(IntegerEntry( | |
188 | + | else if (((aJ + aB) > T)) | |
189 | + | then (T - aJ) | |
190 | + | else aB | |
191 | + | let aL = (fraction(aK, ((U * m) - fraction(((100 * aJ) + (50 * aK)), m, T)), i) + fraction((aB - aK), m, h)) | |
192 | + | let aM = (aH - (aH / 100)) | |
193 | + | if (((aM * aB) > (aL * h))) | |
194 | + | then throw((((((((((("Actual price = " + toString(aL)) + " / ") + toString(aB)) + " < minPrice = ") + toString(aH)) + ", (") + aG) + ", ") + n[aa]) + ")")) | |
195 | + | else $Tuple2(IntegerEntry(aI, (aJ + aB)), aL) | |
235 | 196 | } | |
236 | 197 | ||
237 | 198 | ||
238 | - | func | |
239 | - | let | |
240 | - | let | |
241 | - | let | |
242 | - | then min([ | |
199 | + | func aN (aG,aO,aB,aP) = { | |
200 | + | let aI = Y(aG, aO) | |
201 | + | let aJ = valueOrElse(getInteger(aI), 0) | |
202 | + | let aQ = if ((aJ > T)) | |
203 | + | then min([aB, (aJ - T)]) | |
243 | 204 | else 0 | |
244 | - | let | |
245 | - | let | |
246 | - | let | |
247 | - | let | |
248 | - | if ((( | |
249 | - | then throw((((((((((("Actual price = " + toString( | |
250 | - | else $Tuple3(IntegerEntry( | |
205 | + | let aR = min([aJ, (aB - aQ)]) | |
206 | + | let aS = (aR + aQ) | |
207 | + | let aT = (fraction(aR, ((V * m) - fraction(((100 * aJ) - (50 * aR)), m, T)), i) + fraction(aQ, (2 * m), h)) | |
208 | + | let aU = (aP + (aP / 100)) | |
209 | + | if (((aT * h) > (aU * aS))) | |
210 | + | then throw((((((((((("Actual price = " + toString(aT)) + " / ") + toString(aS)) + " > maxPrice = ") + toString(aP)) + ", (") + aG) + ", ") + o[aO]) + ")")) | |
211 | + | else $Tuple3(IntegerEntry(aI, (aJ - aS)), aT, aS) | |
251 | 212 | } | |
252 | 213 | ||
253 | 214 | ||
254 | - | func | |
255 | - | let | |
256 | - | [toString(valueOrElse(parseInt( | |
257 | - | then | |
258 | - | else "0_0_0_0_0_0", if ((size(split( | |
259 | - | then | |
260 | - | else "0_0_0_0_0_0", | |
215 | + | func aV (aW) = { | |
216 | + | let az = split(valueOrElse(getString(S, aW), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":") | |
217 | + | [toString(valueOrElse(parseInt(az[C]), 0)), if ((size(split(az[D], "_")) == k)) | |
218 | + | then az[D] | |
219 | + | else "0_0_0_0_0_0", if ((size(split(az[E], "_")) == k)) | |
220 | + | then az[E] | |
221 | + | else "0_0_0_0_0_0", az[F]] | |
261 | 222 | } | |
262 | 223 | ||
263 | 224 | ||
264 | - | func | |
225 | + | func aX () = if (valueOrElse(getBoolean(S, ai()), false)) | |
265 | 226 | then throw("Contracts are under maintenance") | |
266 | 227 | else unit | |
267 | 228 | ||
268 | 229 | ||
269 | - | func | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
273 | - | then parseIntValue(split( | |
230 | + | func aY (aZ,ba) = { | |
231 | + | let bb = aZ._1 | |
232 | + | let bc = aZ._8 | |
233 | + | let aC = if (bc) | |
234 | + | then parseIntValue(split(r[bb], "_")[s]) | |
274 | 235 | else 0 | |
275 | - | let | |
276 | - | if ((size( | |
236 | + | let bd = split(ba, "@") | |
237 | + | if ((size(bd) != 2)) | |
277 | 238 | then throw("Incorrect order format, should be amount@price") | |
278 | 239 | else { | |
279 | - | let | |
280 | - | let | |
281 | - | let | |
282 | - | let | |
283 | - | let | |
284 | - | then parseIntValue( | |
240 | + | let be = parseIntValue(bd[0]) | |
241 | + | let bf = parseIntValue(bd[1]) | |
242 | + | let bg = fraction(be, bf, h) | |
243 | + | let bh = aA(be, aC, bc) | |
244 | + | let bi = if ((size(aZ._6) > bb)) | |
245 | + | then parseIntValue(aZ._6[bb]) | |
285 | 246 | else 0 | |
286 | - | let | |
287 | - | then | |
247 | + | let bj = split(if ((size(aZ._7) > bb)) | |
248 | + | then aZ._7[bb] | |
288 | 249 | else "0@0", "@") | |
289 | - | let | |
290 | - | let | |
291 | - | if (if ((0 > | |
250 | + | let bk = parseIntValue(bj[0]) | |
251 | + | let bl = parseIntValue(bj[1]) | |
252 | + | if (if ((0 > bl)) | |
292 | 253 | then true | |
293 | - | else (0 > | |
254 | + | else (0 > bf)) | |
294 | 255 | then throw("Price can't be negative") | |
295 | 256 | else { | |
296 | - | let | |
297 | - | let | |
298 | - | if (( | |
299 | - | then if (( | |
300 | - | then $Tuple8(( | |
301 | - | else $Tuple8(( | |
302 | - | else if (( | |
303 | - | then if ((0 > | |
304 | - | then $Tuple8(( | |
305 | - | else $Tuple8(( | |
306 | - | else if ((0 > | |
257 | + | let bm = fraction(bk, bl, h) | |
258 | + | let bn = aA(bk, aC, bc) | |
259 | + | if ((be == 0)) | |
260 | + | then if ((bk > 0)) | |
261 | + | then $Tuple8((bb + 1), (aZ._2 :+ toString(bi)), aZ._3, aZ._4, (aZ._5 - bm), aZ._6, aZ._7, bc) | |
262 | + | else $Tuple8((bb + 1), (aZ._2 :+ toString((bi - bk))), aZ._3, aZ._4, aZ._5, aZ._6, aZ._7, bc) | |
263 | + | else if ((be > 0)) | |
264 | + | then if ((0 > bk)) | |
265 | + | then $Tuple8((bb + 1), (aZ._2 :+ toString((bi - bk))), (aZ._3 + bh), aZ._4, (aZ._5 + bg), aZ._6, aZ._7, bc) | |
266 | + | else $Tuple8((bb + 1), (aZ._2 :+ toString(bi)), (aZ._3 + bh), aZ._4, ((aZ._5 + bg) - bm), aZ._6, aZ._7, bc) | |
267 | + | else if ((0 > bk)) | |
307 | 268 | then { | |
308 | - | let | |
309 | - | if ((0 > ( | |
310 | - | then throw((((("Attempt to take " + toString( | |
311 | - | else $Tuple8(( | |
269 | + | let bo = (bk - be) | |
270 | + | if ((0 > (bi - bo))) | |
271 | + | then throw((((("Attempt to take " + toString(bo)) + " from warehouse, but only ") + toString(bi)) + " available")) | |
272 | + | else $Tuple8((bb + 1), (aZ._2 :+ toString((bi - bo))), aZ._3, (aZ._4 - bh), aZ._5, aZ._6, aZ._7, bc) | |
312 | 273 | } | |
313 | - | else if ((0 > ( | |
314 | - | then throw((((("Attempt to take " + toString(-( | |
315 | - | else $Tuple8(( | |
274 | + | else if ((0 > (bi + be))) | |
275 | + | then throw((((("Attempt to take " + toString(-(be))) + " from warehouse, but only ") + toString(bi)) + " available")) | |
276 | + | else $Tuple8((bb + 1), (aZ._2 :+ toString((bi + be))), aZ._3, (aZ._4 - bh), (aZ._5 - bm), aZ._6, aZ._7, bc) | |
316 | 277 | } | |
317 | 278 | } | |
318 | 279 | } | |
319 | 280 | ||
320 | 281 | ||
321 | - | func | |
322 | - | let | |
323 | - | let | |
324 | - | let | |
282 | + | func bp (bq,br,bs) = { | |
283 | + | let bt = split(bq[v], "_") | |
284 | + | let bu = split(bq[w], "_") | |
285 | + | let bv = if ((bq[x] == "")) | |
325 | 286 | then nil | |
326 | - | else split( | |
327 | - | let | |
328 | - | let | |
329 | - | let | |
287 | + | else split(bq[x], "_") | |
288 | + | let bw = split(br[ar], "_") | |
289 | + | let bx = split(br[as], "_") | |
290 | + | let by = if ((br[at] == "")) | |
330 | 291 | then nil | |
331 | - | else split( | |
332 | - | if ((size( | |
333 | - | then throw(" | |
292 | + | else split(br[at], "_") | |
293 | + | if ((size(bs) != 3)) | |
294 | + | then throw("newOrderStr should contain exactly 2 ':' separators") | |
334 | 295 | else { | |
335 | - | let | |
336 | - | let | |
337 | - | let | |
296 | + | let bz = split(bs[0], "_") | |
297 | + | let bA = split(bs[1], "_") | |
298 | + | let bB = if ((bs[2] == "")) | |
338 | 299 | then nil | |
339 | - | else split( | |
340 | - | if ((size( | |
300 | + | else split(bs[2], "_") | |
301 | + | if ((size(bz) != k)) | |
341 | 302 | then throw("All 6 resources should be passed") | |
342 | - | else if ((size( | |
303 | + | else if ((size(bA) != k)) | |
343 | 304 | then throw("All 6 materials should be passed") | |
344 | 305 | else { | |
345 | - | let | |
346 | - | let | |
347 | - | let | |
348 | - | let | |
349 | - | func | |
350 | - | then | |
351 | - | else | |
306 | + | let bC = { | |
307 | + | let bD = bz | |
308 | + | let bE = size(bD) | |
309 | + | let bF = $Tuple8(0, nil, 0, 0, 0, bt, bw, false) | |
310 | + | func bG (bH,bI) = if ((bI >= bE)) | |
311 | + | then bH | |
312 | + | else aY(bH, bD[bI]) | |
352 | 313 | ||
353 | - | func | |
354 | - | then | |
314 | + | func bJ (bH,bI) = if ((bI >= bE)) | |
315 | + | then bH | |
355 | 316 | else throw("List size exceeds 6") | |
356 | 317 | ||
357 | - | | |
318 | + | bJ(bG(bG(bG(bG(bG(bG(bF, 0), 1), 2), 3), 4), 5), 6) | |
358 | 319 | } | |
359 | - | let | |
360 | - | let | |
361 | - | let | |
362 | - | let | |
363 | - | func | |
364 | - | then | |
365 | - | else | |
320 | + | let aS = { | |
321 | + | let bD = bA | |
322 | + | let bE = size(bD) | |
323 | + | let bF = $Tuple8(0, nil, bC._3, bC._4, bC._5, bu, bx, false) | |
324 | + | func bK (bH,bI) = if ((bI >= bE)) | |
325 | + | then bH | |
326 | + | else aY(bH, bD[bI]) | |
366 | 327 | ||
367 | - | func | |
368 | - | then | |
328 | + | func bL (bH,bI) = if ((bI >= bE)) | |
329 | + | then bH | |
369 | 330 | else throw("List size exceeds 6") | |
370 | 331 | ||
371 | - | | |
332 | + | bL(bK(bK(bK(bK(bK(bK(bF, 0), 1), 2), 3), 4), 5), 6) | |
372 | 333 | } | |
373 | - | let | |
334 | + | let az = if ((size(bB) != 0)) | |
374 | 335 | then { | |
375 | - | let | |
376 | - | let | |
377 | - | let | |
378 | - | func | |
379 | - | then | |
380 | - | else | |
336 | + | let bD = bB | |
337 | + | let bE = size(bD) | |
338 | + | let bF = $Tuple8(0, nil, aS._3, aS._4, aS._5, bv, by, true) | |
339 | + | func bM (bH,bI) = if ((bI >= bE)) | |
340 | + | then bH | |
341 | + | else aY(bH, bD[bI]) | |
381 | 342 | ||
382 | - | func | |
383 | - | then | |
343 | + | func bN (bH,bI) = if ((bI >= bE)) | |
344 | + | then bH | |
384 | 345 | else throw("List size exceeds 50") | |
385 | 346 | ||
386 | - | | |
347 | + | bN(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bF, 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) | |
387 | 348 | } | |
388 | - | else $Tuple8(0, | |
389 | - | $Tuple6( | |
349 | + | else $Tuple8(0, bv, aS._3, aS._4, aS._5, bv, by, true) | |
350 | + | $Tuple6(bC._2, aS._2, az._2, az._3, az._4, az._5) | |
390 | 351 | } | |
391 | 352 | } | |
392 | 353 | } | |
393 | 354 | ||
394 | 355 | ||
395 | - | func | |
396 | - | let | |
397 | - | let | |
398 | - | let | |
399 | - | then parseIntValue(split( | |
356 | + | func bO (aZ,bP) = { | |
357 | + | let bb = aZ._7 | |
358 | + | let bc = aZ._12 | |
359 | + | let aC = if (bc) | |
360 | + | then parseIntValue(split(r[bb], "_")[s]) | |
400 | 361 | else 0 | |
401 | - | let | |
402 | - | if ((size( | |
362 | + | let bQ = split(bP, "@") | |
363 | + | if ((size(bQ) != 2)) | |
403 | 364 | then throw("Incorrect order format, should be amount@price") | |
404 | 365 | else { | |
405 | - | let | |
406 | - | let | |
407 | - | if ((0 > | |
366 | + | let bR = parseIntValue(bQ[0]) | |
367 | + | let bS = parseIntValue(bQ[1]) | |
368 | + | if ((0 > bS)) | |
408 | 369 | then throw("Price can't be negative") | |
409 | 370 | else { | |
410 | - | let | |
411 | - | let | |
412 | - | then parseIntValue( | |
371 | + | let bT = fraction(bR, bS, h) | |
372 | + | let bU = if ((size(aZ._8) > bb)) | |
373 | + | then parseIntValue(aZ._8[bb]) | |
413 | 374 | else 0 | |
414 | - | let | |
415 | - | then parseIntValue( | |
375 | + | let bi = if ((size(aZ._9) > bb)) | |
376 | + | then parseIntValue(aZ._9[bb]) | |
416 | 377 | else 0 | |
417 | - | let cp = split(bt._10[bv], "@") | |
418 | - | let cq = parseIntValue(cp[0]) | |
419 | - | let cr = parseIntValue(cp[1]) | |
420 | - | if (if ((cl != 0)) | |
421 | - | then (cm != cr) | |
378 | + | let bV = if ((size(aZ._10) > bb)) | |
379 | + | then aZ._10[bb] | |
380 | + | else "0@0" | |
381 | + | let bW = split(bV, "@") | |
382 | + | let bX = parseIntValue(bW[0]) | |
383 | + | let bY = parseIntValue(bW[1]) | |
384 | + | if (if ((bR != 0)) | |
385 | + | then (bS != bY) | |
422 | 386 | else false) | |
423 | - | then throw(((((("Prices of " + | |
387 | + | then throw(((((("Prices of " + aZ._11[bb]) + " don't match! WH price=") + toString(bY)) + ", your price=") + toString(bS))) | |
424 | 388 | else { | |
425 | - | let | |
426 | - | let | |
427 | - | if (( | |
428 | - | then $Tuple12(( | |
429 | - | else if (( | |
430 | - | then if ((0 > | |
431 | - | then if (( | |
432 | - | then throw(((((("Attempt to buy " + toString( | |
433 | - | else $Tuple12(( | |
434 | - | else throw((("Attempt to buy " + | |
435 | - | else if (( | |
436 | - | then if ((-( | |
437 | - | then throw(((((("Attempt to sell " + toString(-( | |
438 | - | else if ((-( | |
439 | - | then throw(((((("Attempt to sell " + toString(-( | |
440 | - | else $Tuple12(( | |
441 | - | else throw((("Attempt to sell " + | |
389 | + | let bZ = fraction(bX, bY, h) | |
390 | + | let ca = aA(bR, aC, bc) | |
391 | + | if ((bR == 0)) | |
392 | + | then $Tuple12((aZ._1 :+ toString(bi)), (aZ._2 :+ bV), (aZ._3 :+ toString(bU)), aZ._4, aZ._5, aZ._6, (aZ._7 + 1), aZ._8, aZ._9, aZ._10, aZ._11, bc) | |
393 | + | else if ((bR > 0)) | |
394 | + | then if ((0 > bX)) | |
395 | + | then if ((bR > -(bX))) | |
396 | + | then throw(((((("Attempt to buy " + toString(bR)) + " of ") + aZ._11[bb]) + ", but warehouse only sells ") + toString(-(bX)))) | |
397 | + | else $Tuple12((aZ._1 :+ toString(bi)), (aZ._2 :+ ((toString((bX + bR)) + "@") + toString(bY))), (aZ._3 :+ toString((bU + bR))), (aZ._4 + ca), aZ._5, (aZ._6 + bT), (aZ._7 + 1), aZ._8, aZ._9, aZ._10, aZ._11, bc) | |
398 | + | else throw((("Attempt to buy " + aZ._11[bb]) + " while warehouse doesn't sell it")) | |
399 | + | else if ((bX > 0)) | |
400 | + | then if ((-(bR) > bX)) | |
401 | + | then throw(((((("Attempt to sell " + toString(-(bR))) + " of ") + aZ._11[bb]) + ", but warehouse only buys ") + toString(bX))) | |
402 | + | else if ((-(bR) > bU)) | |
403 | + | then throw(((((("Attempt to sell " + toString(-(bR))) + ", but you only have ") + toString(bU)) + " of ") + aZ._11[bb])) | |
404 | + | else $Tuple12((aZ._1 :+ toString((bi - bR))), (aZ._2 :+ ((toString((bX + bR)) + "@") + toString(bY))), (aZ._3 :+ toString((bU + bR))), (aZ._4 - ca), (aZ._5 - bT), aZ._6, (aZ._7 + 1), aZ._8, aZ._9, aZ._10, aZ._11, bc) | |
405 | + | else throw((("Attempt to sell " + aZ._11[bb]) + " while warehouse doesn't buy it")) | |
442 | 406 | } | |
443 | 407 | } | |
444 | 408 | } | |
445 | 409 | } | |
446 | 410 | ||
447 | 411 | ||
448 | - | @Callable( | |
449 | - | func recalcLockedVolumeREADONLY ( | |
450 | - | let | |
451 | - | let | |
452 | - | $Tuple2(nil, ( | |
412 | + | @Callable(cb) | |
413 | + | func recalcLockedVolumeREADONLY (ac,cc) = { | |
414 | + | let br = ax(ab(ac)) | |
415 | + | let cd = bp(cc, br, br) | |
416 | + | $Tuple2(nil, (cd._4 + cd._5)) | |
453 | 417 | } | |
454 | 418 | ||
455 | 419 | ||
456 | 420 | ||
457 | - | @Callable( | |
458 | - | func constructorV1 ( | |
421 | + | @Callable(cb) | |
422 | + | func constructorV1 (ce) = if ((cb.caller != this)) | |
459 | 423 | then throw("Permission denied") | |
460 | - | else [StringEntry( | |
424 | + | else [StringEntry(L(), ce)] | |
461 | 425 | ||
462 | 426 | ||
463 | 427 | ||
464 | - | @Callable( | |
465 | - | func sellResources ( | |
466 | - | let | |
467 | - | if (( | |
428 | + | @Callable(cb) | |
429 | + | func sellResources (cf,cg) = { | |
430 | + | let ch = aX() | |
431 | + | if ((ch == ch)) | |
468 | 432 | then { | |
469 | - | let | |
470 | - | if ((size( | |
433 | + | let ag = valueOrErrorMessage(getString(S, ad(toString(cb.caller))), "You don't have a duck staked") | |
434 | + | if ((size(cb.payments) != 0)) | |
471 | 435 | then throw("sellResources doesn't require any payments") | |
472 | 436 | else { | |
473 | - | let | |
474 | - | if (( | |
475 | - | then throw(("Duck location type should be Factory, but is " + | |
437 | + | let ci = split(valueOrElse(getString(S, ah(ag)), l), "_") | |
438 | + | if ((ci[ap] != "F")) | |
439 | + | then throw(("Duck location type should be Factory, but is " + ci[ap])) | |
476 | 440 | else { | |
477 | - | let | |
478 | - | let | |
479 | - | let | |
480 | - | func | |
481 | - | then throw(((((("You have " + | |
482 | - | else if ((0 > | |
483 | - | then throw(((("You tried to sell negative amount of " + | |
484 | - | else if (( | |
441 | + | let aG = ci[aq] | |
442 | + | let cj = aV(af(ag)) | |
443 | + | let ck = split(cj[D], "_") | |
444 | + | func cl (aZ,bb) = if ((cf[bb] > parseIntValue(ck[bb]))) | |
445 | + | then throw(((((("You have " + ck[bb]) + " of ") + n[bb]) + ", but tried to sell ") + toString(cf[bb]))) | |
446 | + | else if ((0 > cf[bb])) | |
447 | + | then throw(((("You tried to sell negative amount of " + n[bb]) + ": ") + toString(cf[bb]))) | |
448 | + | else if ((cf[bb] > 0)) | |
485 | 449 | then { | |
486 | - | let | |
487 | - | $Tuple3(( | |
450 | + | let cm = aF(aG, bb, cf[bb], cg[bb]) | |
451 | + | $Tuple3((aZ._1 :+ cm._1), (aZ._2 :+ toString((parseIntValue(ck[bb]) - cf[bb]))), (aZ._3 + cm._2)) | |
488 | 452 | } | |
489 | - | else $Tuple3( | |
453 | + | else $Tuple3(aZ._1, (aZ._2 :+ ck[bb]), aZ._3) | |
490 | 454 | ||
491 | - | let | |
492 | - | let | |
493 | - | let | |
494 | - | let | |
495 | - | func | |
496 | - | then | |
497 | - | else | |
455 | + | let cn = { | |
456 | + | let bD = [0, 1, 2, 3, 4, 5] | |
457 | + | let bE = size(bD) | |
458 | + | let bF = $Tuple3(nil, nil, 0) | |
459 | + | func bG (bH,bI) = if ((bI >= bE)) | |
460 | + | then bH | |
461 | + | else cl(bH, bD[bI]) | |
498 | 462 | ||
499 | - | func | |
500 | - | then | |
463 | + | func bJ (bH,bI) = if ((bI >= bE)) | |
464 | + | then bH | |
501 | 465 | else throw("List size exceeds 6") | |
502 | 466 | ||
503 | - | | |
467 | + | bJ(bG(bG(bG(bG(bG(bG(bF, 0), 1), 2), 3), 4), 5), 6) | |
504 | 468 | } | |
505 | - | let | |
506 | - | let | |
507 | - | $Tuple2(( | |
469 | + | let co = makeString([cj[C], makeString(cn._2, "_"), cj[E], cj[F]], ":") | |
470 | + | let cp = au(invoke(S, "updateBackpack", [ag, co], nil)) | |
471 | + | $Tuple2((cn._1 :+ ScriptTransfer(cb.caller, cn._3, b)), cp) | |
508 | 472 | } | |
509 | 473 | } | |
510 | 474 | } | |
511 | 475 | else throw("Strict value is not equal to itself.") | |
512 | 476 | } | |
513 | 477 | ||
514 | 478 | ||
515 | 479 | ||
516 | - | @Callable( | |
517 | - | func buyMaterials ( | |
518 | - | let | |
519 | - | if (( | |
480 | + | @Callable(cb) | |
481 | + | func buyMaterials (cf,cq) = { | |
482 | + | let ch = aX() | |
483 | + | if ((ch == ch)) | |
520 | 484 | then { | |
521 | - | let | |
522 | - | if ((size( | |
485 | + | let ag = valueOrErrorMessage(getString(S, ad(toString(cb.caller))), "You don't have a duck staked") | |
486 | + | if ((size(cb.payments) != 1)) | |
523 | 487 | then throw("exactly 1 payment must be attached") | |
524 | 488 | else { | |
525 | - | let | |
526 | - | let | |
527 | - | let | |
528 | - | if (( | |
489 | + | let cr = cb.payments[0] | |
490 | + | let cs = cr.amount | |
491 | + | let ct = valueOrErrorMessage(cr.assetId, "WAVES can't be used as payment") | |
492 | + | if ((ct != b)) | |
529 | 493 | then throw("USDT payments only!") | |
530 | 494 | else { | |
531 | - | let | |
532 | - | if (( | |
533 | - | then throw(("Duck location type should be Factory, but is " + | |
495 | + | let ci = split(valueOrElse(getString(S, ah(ag)), l), "_") | |
496 | + | if ((ci[ap] != "F")) | |
497 | + | then throw(("Duck location type should be Factory, but is " + ci[ap])) | |
534 | 498 | else { | |
535 | - | let | |
536 | - | let | |
537 | - | let | |
538 | - | func | |
539 | - | then throw(((("You tried to buy negative amount of " + | |
540 | - | else if (( | |
499 | + | let aG = ci[aq] | |
500 | + | let cj = aV(af(ag)) | |
501 | + | let cu = split(cj[E], "_") | |
502 | + | func cv (aZ,bb) = if ((0 > cf[bb])) | |
503 | + | then throw(((("You tried to buy negative amount of " + o[bb]) + ": ") + toString(cf[bb]))) | |
504 | + | else if ((cf[bb] > 0)) | |
541 | 505 | then { | |
542 | - | let | |
543 | - | $Tuple3(( | |
506 | + | let cm = aN(aG, bb, cf[bb], cq[bb]) | |
507 | + | $Tuple3((aZ._1 :+ cm._1), (aZ._2 :+ toString((parseIntValue(cu[bb]) + cm._3))), (aZ._3 + cm._2)) | |
544 | 508 | } | |
545 | - | else $Tuple3( | |
509 | + | else $Tuple3(aZ._1, (aZ._2 :+ cu[bb]), aZ._3) | |
546 | 510 | ||
547 | - | let | |
548 | - | let | |
549 | - | let | |
550 | - | let | |
551 | - | func | |
552 | - | then | |
553 | - | else | |
511 | + | let cn = { | |
512 | + | let bD = [0, 1, 2, 3, 4, 5] | |
513 | + | let bE = size(bD) | |
514 | + | let bF = $Tuple3(nil, nil, 0) | |
515 | + | func bG (bH,bI) = if ((bI >= bE)) | |
516 | + | then bH | |
517 | + | else cv(bH, bD[bI]) | |
554 | 518 | ||
555 | - | func | |
556 | - | then | |
519 | + | func bJ (bH,bI) = if ((bI >= bE)) | |
520 | + | then bH | |
557 | 521 | else throw("List size exceeds 6") | |
558 | 522 | ||
559 | - | | |
523 | + | bJ(bG(bG(bG(bG(bG(bG(bF, 0), 1), 2), 3), 4), 5), 6) | |
560 | 524 | } | |
561 | - | if (( | |
562 | - | then throw(((("Insufficient payment! Attached=" + toString( | |
525 | + | if ((cn._3 > cs)) | |
526 | + | then throw(((("Insufficient payment! Attached=" + toString(cs)) + ", required=") + toString(cn._3))) | |
563 | 527 | else { | |
564 | - | let | |
565 | - | let | |
566 | - | let | |
567 | - | then [ScriptTransfer( | |
528 | + | let co = makeString([cj[C], cj[D], makeString(cn._2, "_"), cj[F]], ":") | |
529 | + | let cp = au(invoke(S, "updateBackpack", [ag, co], nil)) | |
530 | + | let N = if (((cs - cn._3) > 0)) | |
531 | + | then [ScriptTransfer(cb.caller, (cs - cn._3), b)] | |
568 | 532 | else nil | |
569 | - | let | |
570 | - | $Tuple2((( | |
533 | + | let cw = (cn._3 / 100) | |
534 | + | $Tuple2(((cn._1 ++ N) :+ ScriptTransfer(R, cw, b)), cp) | |
571 | 535 | } | |
572 | 536 | } | |
573 | 537 | } | |
574 | 538 | } | |
575 | 539 | } | |
576 | 540 | else throw("Strict value is not equal to itself.") | |
577 | 541 | } | |
578 | 542 | ||
579 | 543 | ||
580 | 544 | ||
581 | - | @Callable( | |
582 | - | func exchangeResources ( | |
583 | - | let | |
584 | - | if (( | |
545 | + | @Callable(cb) | |
546 | + | func exchangeResources (cf) = { | |
547 | + | let ch = aX() | |
548 | + | if ((ch == ch)) | |
585 | 549 | then { | |
586 | - | let | |
587 | - | if ((size( | |
550 | + | let ag = valueOrErrorMessage(getString(S, ad(toString(cb.caller))), "You don't have a duck staked") | |
551 | + | if ((size(cb.payments) != 1)) | |
588 | 552 | then throw("exactly 1 payment must be attached") | |
589 | 553 | else { | |
590 | - | let | |
591 | - | let | |
592 | - | let | |
593 | - | if (( | |
554 | + | let cr = cb.payments[0] | |
555 | + | let cs = cr.amount | |
556 | + | let ct = valueOrErrorMessage(cr.assetId, "WAVES can't be used as payment") | |
557 | + | if ((ct != b)) | |
594 | 558 | then throw("USDT payments only!") | |
595 | 559 | else { | |
596 | - | let | |
597 | - | if (( | |
598 | - | then throw(("Duck location type should be Factory, but is " + | |
560 | + | let ci = split(valueOrElse(getString(S, ah(ag)), l), "_") | |
561 | + | if ((ci[ap] != "F")) | |
562 | + | then throw(("Duck location type should be Factory, but is " + ci[ap])) | |
599 | 563 | else { | |
600 | - | let | |
601 | - | let | |
602 | - | let | |
603 | - | let | |
604 | - | func | |
605 | - | let | |
606 | - | let | |
607 | - | let | |
608 | - | if (( | |
609 | - | then throw(((((("You have " + | |
610 | - | else if ((0 > | |
611 | - | then throw(((("You tried to exchange negative amount of " + | |
612 | - | else if (( | |
613 | - | then $Tuple4(( | |
614 | - | else $Tuple4(( | |
564 | + | let aG = ci[aq] | |
565 | + | let cj = aV(af(ag)) | |
566 | + | let ck = split(cj[D], "_") | |
567 | + | let cu = split(cj[E], "_") | |
568 | + | func cx (aZ,bb) = { | |
569 | + | let aI = Y(aG, bb) | |
570 | + | let aJ = valueOrElse(getInteger(aI), 0) | |
571 | + | let cy = cf[bb] | |
572 | + | if ((cy > parseIntValue(ck[bb]))) | |
573 | + | then throw(((((("You have " + ck[bb]) + " of ") + n[bb]) + ", but tried to exchange ") + toString(cy))) | |
574 | + | else if ((0 > cy)) | |
575 | + | then throw(((("You tried to exchange negative amount of " + n[bb]) + ": ") + toString(cy))) | |
576 | + | else if ((cy > 0)) | |
577 | + | then $Tuple4((aZ._1 :+ toString((parseIntValue(ck[bb]) - cy))), (aZ._2 :+ toString((parseIntValue(cu[bb]) + cy))), (aZ._3 + fraction(cy, m, h)), (aZ._4 :+ IntegerEntry(aI, aJ))) | |
578 | + | else $Tuple4((aZ._1 :+ ck[bb]), (aZ._2 :+ cu[bb]), aZ._3, aZ._4) | |
615 | 579 | } | |
616 | 580 | ||
617 | - | let | |
618 | - | let | |
619 | - | let | |
620 | - | let | |
621 | - | func | |
622 | - | then | |
623 | - | else | |
581 | + | let cn = { | |
582 | + | let bD = [0, 1, 2, 3, 4, 5] | |
583 | + | let bE = size(bD) | |
584 | + | let bF = $Tuple4(nil, nil, 0, nil) | |
585 | + | func bG (bH,bI) = if ((bI >= bE)) | |
586 | + | then bH | |
587 | + | else cx(bH, bD[bI]) | |
624 | 588 | ||
625 | - | func | |
626 | - | then | |
589 | + | func bJ (bH,bI) = if ((bI >= bE)) | |
590 | + | then bH | |
627 | 591 | else throw("List size exceeds 6") | |
628 | 592 | ||
629 | - | | |
593 | + | bJ(bG(bG(bG(bG(bG(bG(bF, 0), 1), 2), 3), 4), 5), 6) | |
630 | 594 | } | |
631 | - | if (( | |
632 | - | then throw(((("Insufficient payment! Attached=" + toString( | |
595 | + | if ((cn._3 > cs)) | |
596 | + | then throw(((("Insufficient payment! Attached=" + toString(cs)) + ", required=") + toString(cn._3))) | |
633 | 597 | else { | |
634 | - | let | |
635 | - | let | |
636 | - | let | |
637 | - | then [ScriptTransfer( | |
598 | + | let co = makeString([cj[C], makeString(cn._1, "_"), makeString(cn._2, "_"), cj[F]], ":") | |
599 | + | let cp = au(invoke(S, "updateBackpack", [ag, co], nil)) | |
600 | + | let N = if (((cs - cn._3) > 0)) | |
601 | + | then [ScriptTransfer(cb.caller, (cs - cn._3), b)] | |
638 | 602 | else nil | |
639 | - | let | |
640 | - | $Tuple2((( | |
603 | + | let cw = (cn._3 / 100) | |
604 | + | $Tuple2(((N ++ cn._4) :+ ScriptTransfer(R, cw, b)), cp) | |
641 | 605 | } | |
642 | 606 | } | |
643 | 607 | } | |
644 | 608 | } | |
645 | 609 | } | |
646 | 610 | else throw("Strict value is not equal to itself.") | |
647 | 611 | } | |
648 | 612 | ||
649 | 613 | ||
650 | 614 | ||
651 | - | @Callable( | |
652 | - | func craftGoods ( | |
653 | - | let | |
654 | - | if (( | |
655 | - | then if ((size( | |
615 | + | @Callable(cb) | |
616 | + | func craftGoods (cz,cA) = { | |
617 | + | let ch = aX() | |
618 | + | if ((ch == ch)) | |
619 | + | then if ((size(cb.payments) != 1)) | |
656 | 620 | then throw("exactly 1 payment must be attached") | |
657 | 621 | else { | |
658 | - | let | |
659 | - | let | |
660 | - | let | |
661 | - | if (( | |
622 | + | let cr = cb.payments[0] | |
623 | + | let cs = cr.amount | |
624 | + | let ct = valueOrErrorMessage(cr.assetId, "WAVES can't be used as payment") | |
625 | + | if ((ct != b)) | |
662 | 626 | then throw("USDT payments only!") | |
663 | - | else if (( | |
627 | + | else if ((cs != f)) | |
664 | 628 | then throw("exactly 1 USDT must be attached as payment") | |
665 | - | else if ((0 >= | |
629 | + | else if ((0 >= cA)) | |
666 | 630 | then throw("Quantity should be positive") | |
667 | 631 | else { | |
668 | - | let | |
669 | - | let | |
670 | - | if (( | |
671 | - | then throw(("Duck location type should be Manufactory, but is " + | |
632 | + | let ag = valueOrErrorMessage(getString(S, ad(toString(cb.caller))), "You don't have a duck staked") | |
633 | + | let ci = split(valueOrElse(getString(S, ah(ag)), l), "_") | |
634 | + | if ((ci[ap] != "M")) | |
635 | + | then throw(("Duck location type should be Manufactory, but is " + ci[ap])) | |
672 | 636 | else { | |
673 | - | let | |
674 | - | let | |
675 | - | let | |
676 | - | if (if ((0 > | |
637 | + | let cB = ci[ao] | |
638 | + | let cj = aV(af(ag)) | |
639 | + | let cu = split(cj[E], "_") | |
640 | + | if (if ((0 > cz)) | |
677 | 641 | then true | |
678 | - | else ( | |
679 | - | then throw(("Unknown product idx=" + toString( | |
642 | + | else (cz >= size(r))) | |
643 | + | then throw(("Unknown product idx=" + toString(cz))) | |
680 | 644 | else { | |
681 | - | let | |
682 | - | if ((size( | |
683 | - | then throw(("Fatal: unknown recipe: " + | |
645 | + | let cC = split(r[cz], "_") | |
646 | + | if ((size(cC) != (k + 3))) | |
647 | + | then throw(("Fatal: unknown recipe: " + r[cz])) | |
684 | 648 | else { | |
685 | - | let | |
686 | - | if (( | |
687 | - | then throw(((("This product is available in " + | |
649 | + | let cD = parseIntValue(cC[t]) | |
650 | + | if ((q[cD] != cB)) | |
651 | + | then throw(((("This product is available in " + q[cD]) + ", but you are in ") + cB)) | |
688 | 652 | else { | |
689 | - | let | |
653 | + | let cE = if ((cj[F] == "")) | |
690 | 654 | then nil | |
691 | - | else split( | |
692 | - | func | |
693 | - | let | |
694 | - | let | |
695 | - | then | |
655 | + | else split(cj[F], "_") | |
656 | + | func cF (aZ,cG) = { | |
657 | + | let cH = aZ._2 | |
658 | + | let cI = if ((size(cE) > cH)) | |
659 | + | then cE[cH] | |
696 | 660 | else "0" | |
697 | - | let | |
698 | - | let | |
699 | - | let | |
700 | - | then toString(( | |
701 | - | else | |
702 | - | $Tuple2(( | |
661 | + | let cJ = parseIntValue(cI) | |
662 | + | let aB = (cA * parseIntValue(cC[s])) | |
663 | + | let cK = if ((cH == cz)) | |
664 | + | then toString((cJ + aB)) | |
665 | + | else cI | |
666 | + | $Tuple2((aZ._1 :+ cK), (cH + 1)) | |
703 | 667 | } | |
704 | 668 | ||
705 | - | let | |
706 | - | let | |
707 | - | let | |
708 | - | func | |
709 | - | then | |
710 | - | else | |
669 | + | let cL = ( let bD = r | |
670 | + | let bE = size(bD) | |
671 | + | let bF = $Tuple2(nil, 0) | |
672 | + | func bG (bH,bI) = if ((bI >= bE)) | |
673 | + | then bH | |
674 | + | else cF(bH, bD[bI]) | |
711 | 675 | ||
712 | - | func | |
713 | - | then | |
676 | + | func bJ (bH,bI) = if ((bI >= bE)) | |
677 | + | then bH | |
714 | 678 | else throw("List size exceeds 50") | |
715 | 679 | ||
716 | - | | |
717 | - | func | |
718 | - | let | |
719 | - | let | |
720 | - | if (( | |
721 | - | then throw(((((((("You have " + | |
722 | - | else if (( | |
723 | - | then ( | |
724 | - | else ( | |
680 | + | bJ(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bG(bF, 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 | |
681 | + | func cM (aZ,bb) = { | |
682 | + | let cN = ((parseIntValue(cC[bb]) * g) * cA) | |
683 | + | let cO = parseIntValue(cu[bb]) | |
684 | + | if ((cN > cO)) | |
685 | + | then throw(((((((("You have " + cu[bb]) + " of ") + o[bb]) + ", but recipe requires ") + toString(cN)) + " for quantity ") + toString(cA))) | |
686 | + | else if ((cN > 0)) | |
687 | + | then (aZ :+ toString((cO - cN))) | |
688 | + | else (aZ :+ cu[bb]) | |
725 | 689 | } | |
726 | 690 | ||
727 | - | let | |
728 | - | let | |
729 | - | let | |
730 | - | let | |
731 | - | func | |
732 | - | then | |
733 | - | else | |
691 | + | let cn = { | |
692 | + | let bD = [0, 1, 2, 3, 4, 5] | |
693 | + | let bE = size(bD) | |
694 | + | let bF = nil | |
695 | + | func bK (bH,bI) = if ((bI >= bE)) | |
696 | + | then bH | |
697 | + | else cM(bH, bD[bI]) | |
734 | 698 | ||
735 | - | func | |
736 | - | then | |
699 | + | func bL (bH,bI) = if ((bI >= bE)) | |
700 | + | then bH | |
737 | 701 | else throw("List size exceeds 6") | |
738 | 702 | ||
739 | - | | |
703 | + | bL(bK(bK(bK(bK(bK(bK(bF, 0), 1), 2), 3), 4), 5), 6) | |
740 | 704 | } | |
741 | - | let | |
742 | - | let | |
743 | - | $Tuple2(nil, | |
705 | + | let co = makeString([cj[C], cj[D], makeString(cn, "_"), makeString(cL, "_")], ":") | |
706 | + | let cp = au(invoke(S, "updateBackpack", [ag, co], nil)) | |
707 | + | $Tuple2(nil, cp) | |
744 | 708 | } | |
745 | 709 | } | |
746 | 710 | } | |
747 | 711 | } | |
748 | 712 | } | |
749 | 713 | } | |
750 | 714 | else throw("Strict value is not equal to itself.") | |
751 | 715 | } | |
752 | 716 | ||
753 | 717 | ||
754 | 718 | ||
755 | - | @Callable( | |
756 | - | func setWarehouseOrder ( | |
757 | - | let | |
758 | - | let | |
759 | - | let | |
760 | - | then | |
719 | + | @Callable(cb) | |
720 | + | func setWarehouseOrder (cP,ac) = { | |
721 | + | let cQ = cb.originCaller | |
722 | + | let an = toString(cQ) | |
723 | + | let cp = if ((cQ != R)) | |
724 | + | then aX() | |
761 | 725 | else false | |
762 | - | let | |
763 | - | if (!(isDefined(getInteger( | |
764 | - | then throw((("NFT " + | |
726 | + | let cR = value(assetInfo(fromBase58String(ac))) | |
727 | + | if (!(isDefined(getInteger(S, al(ac))))) | |
728 | + | then throw((("NFT " + cR.name) + " is not staked")) | |
765 | 729 | else { | |
766 | - | let | |
767 | - | if (if (( | |
768 | - | then ( | |
730 | + | let cS = valueOrErrorMessage(getString(S, aj(ac)), (("NFT " + cR.name) + " is orphaned")) | |
731 | + | if (if ((cQ != R)) | |
732 | + | then (cS != an) | |
769 | 733 | else false) | |
770 | - | then throw(( | |
734 | + | then throw((j + " is not yours")) | |
771 | 735 | else { | |
772 | - | let dm = split_4C(di, ":") | |
773 | - | let cv = aO(invoke(z, "getWarehouseREADONLY", [aj], nil)) | |
774 | - | let bK = split_4C(cv, ":") | |
775 | - | let dn = split(bK[aG], "_") | |
776 | - | let do = parseIntValue(dn[aI]) | |
777 | - | let dp = parseIntValue(dn[aK]) | |
778 | - | let aS = ai(aj) | |
779 | - | let bL = aR(aS) | |
780 | - | let cw = bJ(bK, bL, dm) | |
781 | - | let dq = cw._4 | |
782 | - | let dr = cw._5 | |
783 | - | let ds = (dq + dr) | |
784 | - | let dt = ((dp - do) - ds) | |
785 | - | if ((dq > dt)) | |
786 | - | then throw((((("Attempt to reserve " + toString(dq)) + " space for buy orders, but only ") + toString(dt)) + " warehouse empty space left")) | |
787 | - | else if ((dr > do)) | |
788 | - | then throw((((("Attempt to lock " + toString(dr)) + " space for sell orders, but only ") + toString(do)) + " warehouse space occupied")) | |
789 | - | else { | |
790 | - | let du = makeString_2C([bK[aC], makeString(cw._1, "_"), makeString(cw._2, "_"), makeString(cw._3, "_"), toString(ds)], ":") | |
791 | - | let dv = invoke(z, "saveWarehouse", [du, aj], nil) | |
792 | - | if ((dv == dv)) | |
793 | - | then { | |
794 | - | let dw = cw._6 | |
795 | - | let dx = if ((dw > 0)) | |
796 | - | then if ((size(cu.payments) != 1)) | |
797 | - | then throw("exactly 1 payment must be attached") | |
798 | - | else { | |
799 | - | let cK = cu.payments[0] | |
800 | - | let cL = cK.amount | |
801 | - | let cM = valueOrErrorMessage(cK.assetId, "WAVES can't be used as payment") | |
802 | - | if ((cM != g)) | |
803 | - | then throw("USDT payments only!") | |
804 | - | else if ((cL != dw)) | |
805 | - | then throw(("Payment needed is " + toString(dw))) | |
806 | - | else [StringEntry(aS, di)] | |
807 | - | } | |
808 | - | else if ((dw == 0)) | |
809 | - | then if ((size(cu.payments) != 0)) | |
810 | - | then throw("No payments needed") | |
811 | - | else [StringEntry(aS, di)] | |
812 | - | else if ((size(cu.payments) != 0)) | |
813 | - | then throw("No payments needed") | |
814 | - | else [ScriptTransfer(addressFromStringValue(dl), -(dw), g), StringEntry(aS, di)] | |
815 | - | $Tuple2(dx, cI) | |
736 | + | let cT = split_4C(cP, ":") | |
737 | + | let cc = au(invoke(S, "getWarehouseREADONLY", [ac], nil)) | |
738 | + | let bq = split_4C(cc, ":") | |
739 | + | let cU = split(bq[y], "_") | |
740 | + | let cV = parseIntValue(cU[A]) | |
741 | + | let cW = parseIntValue(cU[B]) | |
742 | + | let ay = ab(ac) | |
743 | + | let br = ax(ay) | |
744 | + | let cd = bp(bq, br, cT) | |
745 | + | let cX = cd._4 | |
746 | + | let cY = cd._5 | |
747 | + | let cZ = (cX + cY) | |
748 | + | let da = ((cW - cV) - cZ) | |
749 | + | if ((0 > da)) | |
750 | + | then throw((((("Attempt to reserve " + toString(cX)) + " space for buy orders, and ") + toString(cY)) + " space for sell orders, leads to negative free space")) | |
751 | + | else { | |
752 | + | let db = makeString_2C([bq[u], makeString(cd._1, "_"), makeString(cd._2, "_"), makeString(cd._3, "_"), toString(cZ)], ":") | |
753 | + | let dc = au(invoke(S, "saveWarehouse", [db, ac], nil)) | |
754 | + | let dd = cd._6 | |
755 | + | let de = if ((dd > 0)) | |
756 | + | then if ((size(cb.payments) != 1)) | |
757 | + | then throw("exactly 1 payment must be attached") | |
758 | + | else { | |
759 | + | let cr = cb.payments[0] | |
760 | + | let cs = cr.amount | |
761 | + | let ct = valueOrErrorMessage(cr.assetId, "WAVES can't be used as payment") | |
762 | + | if ((ct != b)) | |
763 | + | then throw("USDT payments only!") | |
764 | + | else if ((cs != dd)) | |
765 | + | then throw(("Payment needed is " + toString(dd))) | |
766 | + | else [StringEntry(ay, cP)] | |
816 | 767 | } | |
817 | - | else throw("Strict value is not equal to itself.") | |
818 | - | } | |
768 | + | else if ((dd == 0)) | |
769 | + | then if ((size(cb.payments) != 0)) | |
770 | + | then throw("No payments needed") | |
771 | + | else [StringEntry(ay, cP)] | |
772 | + | else if ((size(cb.payments) != 0)) | |
773 | + | then throw("No payments needed") | |
774 | + | else [ScriptTransfer(addressFromStringValue(cS), -(dd), b), StringEntry(ay, cP)] | |
775 | + | $Tuple2(de, $Tuple2(cp, dc)) | |
776 | + | } | |
819 | 777 | } | |
820 | 778 | } | |
821 | 779 | } | |
822 | 780 | ||
823 | 781 | ||
824 | 782 | ||
825 | - | @Callable(cu) | |
826 | - | func acceptWarehouseOrder (dy,aj,an) = { | |
827 | - | let cA = br() | |
828 | - | if ((cA == cA)) | |
829 | - | then { | |
830 | - | let dz = cu.originCaller | |
831 | - | let dA = toString(dz) | |
832 | - | let dB = valueOrErrorMessage(getString(z, ak(dA)), "You don't have a duck staked") | |
833 | - | let cB = valueOrElse(getString(z, ao(dB)), A) | |
834 | - | let dC = split(value(cB), "_") | |
835 | - | if ((dC[aw] != "L")) | |
836 | - | then throw((("Duck location type is " + dC[aw]) + ", but should be L")) | |
837 | - | else if ((dB != an)) | |
838 | - | then throw(((("Your staked duck is " + dB) + ", but passed ") + an)) | |
783 | + | @Callable(cb) | |
784 | + | func acceptWarehouseOrder (df,ac,ag) = { | |
785 | + | let ch = aX() | |
786 | + | let dg = cb.originCaller | |
787 | + | let dh = toString(dg) | |
788 | + | let di = valueOrErrorMessage(getString(S, ad(dh)), "You don't have a duck staked") | |
789 | + | let ci = valueOrElse(getString(S, ah(di)), l) | |
790 | + | let dj = split(value(ci), "_") | |
791 | + | if ((dj[ap] != "L")) | |
792 | + | then throw((("Duck location type is " + dj[ap]) + ", but should be L")) | |
793 | + | else if ((di != ag)) | |
794 | + | then throw(((("Your staked duck is " + di) + ", but passed ") + ag)) | |
795 | + | else { | |
796 | + | let dk = value(assetInfo(fromBase58String(ac))) | |
797 | + | if (!(isDefined(getInteger(S, al(ac))))) | |
798 | + | then throw((("NFT " + dk.name) + " is not staked")) | |
839 | 799 | else { | |
840 | - | let | |
841 | - | if ( | |
842 | - | then throw( | |
800 | + | let dl = valueOrErrorMessage(getString(S, aj(ac)), (("NFT " + dk.name) + " is orphaned")) | |
801 | + | if ((dl == dh)) | |
802 | + | then throw("You cannot trade with yourself") | |
843 | 803 | else { | |
844 | - | let | |
845 | - | if (( | |
846 | - | then throw(" | |
804 | + | let dm = split_4C(df, ":") | |
805 | + | if ((size(dm) != 3)) | |
806 | + | then throw("bpOrderStr should contain exactly 2 ':' separators") | |
847 | 807 | else { | |
848 | - | let dF = split_4C(dy, ":") | |
849 | - | if ((size(dF) != 3)) | |
850 | - | then throw("bpOrderStr should contain exactly 2 ':' separators") | |
851 | - | else { | |
852 | - | let dG = split(dF[0], "_") | |
853 | - | let dH = split(dF[1], "_") | |
854 | - | let dI = if ((dF[2] == "")) | |
855 | - | then nil | |
856 | - | else split(dF[2], "_") | |
857 | - | if ((size(dG) != B)) | |
858 | - | then throw("All 6 resources should be passed") | |
859 | - | else if ((size(dH) != B)) | |
860 | - | then throw("All 6 materials should be passed") | |
861 | - | else { | |
862 | - | let cv = aO(invoke(z, "getWarehouseREADONLY", [aj], nil)) | |
863 | - | let bK = split_4C(cv, ":") | |
864 | - | let bN = split(bK[aD], "_") | |
865 | - | let bO = split(bK[aE], "_") | |
866 | - | let bP = if ((bK[aF] == "")) | |
867 | - | then nil | |
868 | - | else split(bK[aF], "_") | |
869 | - | let dJ = parseIntValue(split(bK[aG], "_")[aH]) | |
870 | - | let bq = am(an) | |
871 | - | let cC = bp(bq) | |
872 | - | let dK = split(cC[az], "_") | |
873 | - | let dL = split(cC[aA], "_") | |
874 | - | let dM = if ((cC[aB] == "")) | |
875 | - | then nil | |
876 | - | else split(cC[aB], "_") | |
877 | - | let aS = ai(aj) | |
878 | - | let dN = aR(aS) | |
879 | - | let dO = split(dN[aL], "_") | |
880 | - | let dP = split(dN[aM], "_") | |
881 | - | let dQ = if ((dN[aN] == "")) | |
882 | - | then nil | |
883 | - | else split(dN[aN], "_") | |
884 | - | let bW = { | |
885 | - | let bX = dG | |
886 | - | let bY = size(bX) | |
887 | - | let bZ = $Tuple12(nil, nil, nil, 0, 0, 0, 0, dK, bN, dO, M, false) | |
888 | - | func ca (cb,cc) = if ((cc >= bY)) | |
889 | - | then cb | |
890 | - | else ci(cb, bX[cc]) | |
808 | + | let dn = split(dm[0], "_") | |
809 | + | let do = split(dm[1], "_") | |
810 | + | let dp = if ((dm[2] == "")) | |
811 | + | then nil | |
812 | + | else split(dm[2], "_") | |
813 | + | if ((size(dn) != k)) | |
814 | + | then throw("All 6 resources should be passed") | |
815 | + | else if ((size(do) != k)) | |
816 | + | then throw("All 6 materials should be passed") | |
817 | + | else { | |
818 | + | let cc = au(invoke(S, "getWarehouseREADONLY", [ac], nil)) | |
819 | + | let bq = split_4C(cc, ":") | |
820 | + | let bt = split(bq[v], "_") | |
821 | + | let bu = split(bq[w], "_") | |
822 | + | let bv = if ((bq[x] == "")) | |
823 | + | then nil | |
824 | + | else split(bq[x], "_") | |
825 | + | let dq = parseIntValue(split(bq[y], "_")[z]) | |
826 | + | let aW = af(ag) | |
827 | + | let cj = aV(aW) | |
828 | + | let dr = split(cj[D], "_") | |
829 | + | let ds = split(cj[E], "_") | |
830 | + | let dt = if ((cj[F] == "")) | |
831 | + | then nil | |
832 | + | else split(cj[F], "_") | |
833 | + | let ay = ab(ac) | |
834 | + | let du = ax(ay) | |
835 | + | let dv = split(du[ar], "_") | |
836 | + | let dw = split(du[as], "_") | |
837 | + | let dx = if ((du[at] == "")) | |
838 | + | then nil | |
839 | + | else split(du[at], "_") | |
840 | + | let bC = { | |
841 | + | let bD = dn | |
842 | + | let bE = size(bD) | |
843 | + | let bF = $Tuple12(nil, nil, nil, 0, 0, 0, 0, dr, bt, dv, n, false) | |
844 | + | func bG (bH,bI) = if ((bI >= bE)) | |
845 | + | then bH | |
846 | + | else bO(bH, bD[bI]) | |
891 | 847 | ||
892 | - | ||
893 | - | ||
894 | - | ||
848 | + | func bJ (bH,bI) = if ((bI >= bE)) | |
849 | + | then bH | |
850 | + | else throw("List size exceeds 6") | |
895 | 851 | ||
896 | - | cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6) | |
852 | + | bJ(bG(bG(bG(bG(bG(bG(bF, 0), 1), 2), 3), 4), 5), 6) | |
853 | + | } | |
854 | + | let aS = { | |
855 | + | let bD = do | |
856 | + | let bE = size(bD) | |
857 | + | let bF = $Tuple12(nil, nil, nil, bC._4, bC._5, bC._6, 0, ds, bu, dw, o, false) | |
858 | + | func bK (bH,bI) = if ((bI >= bE)) | |
859 | + | then bH | |
860 | + | else bO(bH, bD[bI]) | |
861 | + | ||
862 | + | func bL (bH,bI) = if ((bI >= bE)) | |
863 | + | then bH | |
864 | + | else throw("List size exceeds 6") | |
865 | + | ||
866 | + | bL(bK(bK(bK(bK(bK(bK(bF, 0), 1), 2), 3), 4), 5), 6) | |
867 | + | } | |
868 | + | let az = if ((size(dp) != 0)) | |
869 | + | then { | |
870 | + | let bD = dp | |
871 | + | let bE = size(bD) | |
872 | + | let bF = $Tuple12(nil, nil, nil, aS._4, aS._5, aS._6, 0, dt, bv, dx, p, true) | |
873 | + | func bM (bH,bI) = if ((bI >= bE)) | |
874 | + | then bH | |
875 | + | else bO(bH, bD[bI]) | |
876 | + | ||
877 | + | func bN (bH,bI) = if ((bI >= bE)) | |
878 | + | then bH | |
879 | + | else throw("List size exceeds 50") | |
880 | + | ||
881 | + | bN(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bM(bF, 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) | |
882 | + | } | |
883 | + | else $Tuple12(bv, dx, dt, aS._4, aS._5, aS._6, 0, dt, bv, dx, p, true) | |
884 | + | let dy = az._4 | |
885 | + | let dz = if ((0 > (dq - dy))) | |
886 | + | then 0 | |
887 | + | else (dq - dy) | |
888 | + | let db = makeString_2C([bq[u], makeString(bC._1, "_"), makeString(aS._1, "_"), makeString(az._1, "_"), toString(dz)], ":") | |
889 | + | let dA = makeString_2C([makeString(bC._2, "_"), makeString(aS._2, "_"), makeString(az._2, "_")], ":") | |
890 | + | let dB = makeString_2C([cj[C], makeString(bC._3, "_"), makeString(aS._3, "_"), makeString(az._3, "_")], ":") | |
891 | + | let dc = au(invoke(S, "saveWarehouse", [db, ac], nil)) | |
892 | + | let dC = au(invoke(S, "updateBackpack", [ag, dB], nil)) | |
893 | + | let de = [StringEntry(ay, dA)] | |
894 | + | let dD = az._5 | |
895 | + | let dE = if ((dD > 0)) | |
896 | + | then { | |
897 | + | let dF = fraction(az._5, W, f) | |
898 | + | let dG = am(dh) | |
899 | + | let dH = getString(S, dG) | |
900 | + | if (isDefined(dH)) | |
901 | + | then (((de :+ ScriptTransfer(dg, (az._5 - (3 * dF)), b)) :+ ScriptTransfer(R, dF, b)) :+ ScriptTransfer(addressFromStringValue(value(dH)), dF, b)) | |
902 | + | else ((de :+ ScriptTransfer(dg, (az._5 - (3 * dF)), b)) :+ ScriptTransfer(R, dF, b)) | |
903 | + | } | |
904 | + | else de | |
905 | + | let dI = az._6 | |
906 | + | let dJ = if ((dI > 0)) | |
907 | + | then if ((size(cb.payments) != 1)) | |
908 | + | then throw("exactly 1 payment must be attached") | |
909 | + | else { | |
910 | + | let cr = cb.payments[0] | |
911 | + | let cs = cr.amount | |
912 | + | let ct = valueOrErrorMessage(cr.assetId, "WAVES can't be used as payment") | |
913 | + | if ((ct != b)) | |
914 | + | then throw("USDT payments only!") | |
915 | + | else if ((cs != dI)) | |
916 | + | then throw(("Payment needed is " + toString(dI))) | |
917 | + | else if ((X > cs)) | |
918 | + | then throw(("Payment should be at least " + toString(X))) | |
919 | + | else { | |
920 | + | let dK = fraction(az._6, W, f) | |
921 | + | let dG = am(dl) | |
922 | + | let dH = getString(S, dG) | |
923 | + | if (isDefined(dH)) | |
924 | + | then (((dE :+ ScriptTransfer(addressFromStringValue(dl), (az._6 - (3 * dK)), b)) :+ ScriptTransfer(R, dK, b)) :+ ScriptTransfer(addressFromStringValue(value(dH)), dK, b)) | |
925 | + | else ((dE :+ ScriptTransfer(addressFromStringValue(dl), (az._6 - (3 * dK)), b)) :+ ScriptTransfer(R, dK, b)) | |
926 | + | } | |
897 | 927 | } | |
898 | - | let bm = { | |
899 | - | let bX = dH | |
900 | - | let bY = size(bX) | |
901 | - | let bZ = $Tuple12(nil, nil, nil, bW._4, bW._5, bW._6, 0, dL, bO, dP, N, false) | |
902 | - | func ce (cb,cc) = if ((cc >= bY)) | |
903 | - | then cb | |
904 | - | else ci(cb, bX[cc]) | |
905 | - | ||
906 | - | func cf (cb,cc) = if ((cc >= bY)) | |
907 | - | then cb | |
908 | - | else throw("List size exceeds 6") | |
909 | - | ||
910 | - | cf(ce(ce(ce(ce(ce(ce(bZ, 0), 1), 2), 3), 4), 5), 6) | |
911 | - | } | |
912 | - | let aT = if ((size(dI) != 0)) | |
913 | - | then { | |
914 | - | let bX = dI | |
915 | - | let bY = size(bX) | |
916 | - | let bZ = $Tuple12(nil, nil, nil, bm._4, bm._5, bm._6, 0, dM, bP, dQ, O, true) | |
917 | - | func cg (cb,cc) = if ((cc >= bY)) | |
918 | - | then cb | |
919 | - | else ci(cb, bX[cc]) | |
920 | - | ||
921 | - | func ch (cb,cc) = if ((cc >= bY)) | |
922 | - | then cb | |
923 | - | else throw("List size exceeds 50") | |
924 | - | ||
925 | - | ch(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(bZ, 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) | |
926 | - | } | |
927 | - | else $Tuple12(bP, dQ, dM, bm._4, bm._5, bm._6, 0, dM, bP, dQ, O, true) | |
928 | - | let dR = aT._4 | |
929 | - | let dS = if ((0 > (dJ - dR))) | |
930 | - | then 0 | |
931 | - | else (dJ - dR) | |
932 | - | let du = makeString_2C([bK[aC], makeString(bW._1, "_"), makeString(bm._1, "_"), makeString(aT._1, "_"), toString(dS)], ":") | |
933 | - | let dT = makeString_2C([makeString(bW._2, "_"), makeString(bm._2, "_"), makeString(aT._2, "_")], ":") | |
934 | - | let dU = makeString_2C([cC[ay], makeString(bW._3, "_"), makeString(bm._3, "_"), makeString(aT._3, "_")], ":") | |
935 | - | let dv = invoke(z, "saveWarehouse", [du, aj], nil) | |
936 | - | if ((dv == dv)) | |
937 | - | then { | |
938 | - | let dV = invoke(z, "updateBackpack", [an, dU], nil) | |
939 | - | if ((dV == dV)) | |
940 | - | then { | |
941 | - | let dx = [StringEntry(aS, dT)] | |
942 | - | let dW = aT._5 | |
943 | - | let dX = if ((dW > 0)) | |
944 | - | then { | |
945 | - | let dY = fraction(aT._5, K, b) | |
946 | - | let dZ = at(dA) | |
947 | - | let ea = getString(z, dZ) | |
948 | - | if (isDefined(ea)) | |
949 | - | then (((dx :+ ScriptTransfer(dz, (aT._5 - (3 * dY)), g)) :+ ScriptTransfer(y, dY, g)) :+ ScriptTransfer(addressFromStringValue(value(ea)), dY, g)) | |
950 | - | else ((dx :+ ScriptTransfer(dz, (aT._5 - (3 * dY)), g)) :+ ScriptTransfer(y, dY, g)) | |
951 | - | } | |
952 | - | else dx | |
953 | - | let eb = aT._6 | |
954 | - | if ((eb > 0)) | |
955 | - | then if ((size(cu.payments) != 1)) | |
956 | - | then throw("exactly 1 payment must be attached") | |
957 | - | else { | |
958 | - | let cK = cu.payments[0] | |
959 | - | let cL = cK.amount | |
960 | - | let cM = valueOrErrorMessage(cK.assetId, "WAVES can't be used as payment") | |
961 | - | if ((cM != g)) | |
962 | - | then throw("USDT payments only!") | |
963 | - | else if ((cL != eb)) | |
964 | - | then throw(("Payment needed is " + toString(eb))) | |
965 | - | else if ((L > cL)) | |
966 | - | then throw(("Payment should be at least " + toString(L))) | |
967 | - | else { | |
968 | - | let ec = fraction(aT._6, K, b) | |
969 | - | let dZ = at(dE) | |
970 | - | let ea = getString(z, dZ) | |
971 | - | if (isDefined(ea)) | |
972 | - | then (((dX :+ ScriptTransfer(addressFromStringValue(dE), (aT._6 - (3 * ec)), g)) :+ ScriptTransfer(y, ec, g)) :+ ScriptTransfer(addressFromStringValue(value(ea)), ec, g)) | |
973 | - | else ((dX :+ ScriptTransfer(addressFromStringValue(dE), (aT._6 - (3 * ec)), g)) :+ ScriptTransfer(y, ec, g)) | |
974 | - | } | |
975 | - | } | |
976 | - | else if ((size(cu.payments) != 0)) | |
977 | - | then throw("No payments needed") | |
978 | - | else dX | |
979 | - | } | |
980 | - | else throw("Strict value is not equal to itself.") | |
981 | - | } | |
982 | - | else throw("Strict value is not equal to itself.") | |
983 | - | } | |
984 | - | } | |
928 | + | else if ((size(cb.payments) != 0)) | |
929 | + | then throw("No payments needed") | |
930 | + | else dE | |
931 | + | $Tuple2(dJ, $Tuple3(ch, dc, dC)) | |
932 | + | } | |
985 | 933 | } | |
986 | 934 | } | |
987 | 935 | } | |
988 | - | } | |
989 | - | else throw("Strict value is not equal to itself.") | |
936 | + | } | |
990 | 937 | } | |
991 | 938 | ||
992 | 939 |
github/deemru/w8io/026f985 507.89 ms ◑