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/l41uNrAWrZd6aQ6EvFrsF8xq3h6XxxRgJAAIBAg1Vbmtub3duIGNoYWluABVkZWZhdWx0UmVzdEFkZHJlc3NTdHIEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDACIzNQUUN1dkZidmg0TGtQVW5yblUxejNqbmJBMXA5bTNXTmh2AwkAAAIBAVQFByRtYXRjaDACIzNNdW1rR0d6dENLQVhwV0RxeGtkZG9mcVhTVWJxUWt2U0p5CQACAQINVW5rbm93biBjaGFpbgADU0VQAgJfXwAFTVVMVDYAwIQ9AAVNVUxUNwCAreIEAAVNVUxUOACAwtcvAAZNVUxUMTAAgMivoCU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N0BQt1c2RCcDJXaEZlZQULdXNkdEFzc2V0SWQJAQ5TY3JpcHRUcmFuc2ZlcgMJARFAZXh0ck5hdGl2ZSgxMDYyKQEJAQV2YWx1ZQEFBXJlZkJ5BQt1c2RCcDJXaEZlZQULdXNkdEFzc2V0SWQJAM0IAgkAzQgCBQhhY3Rpb25zMQkBDlNjcmlwdFRyYW5zZmVyAwkBEUBleHRyTmF0aXZlKDEwNjIpAQUJbGFuZE93bmVyCQBlAggFAXACXzYJAGgCAAMFC3VzZEJwMldoRmVlBQt1c2R0QXNzZXRJZAkBDlNjcmlwdFRyYW5zZmVyAwUMcmVzdENvbnRyYWN0BQt1c2RCcDJXaEZlZQULdXNkdEFzc2V0SWQDCQECIT0CCQCQAwEIBQFpCHBheW1lbnRzAAAJAAIBAhJObyBwYXltZW50cyBuZWVkZWQFCGFjdGlvbnMxCQCUCgIFCGFjdGlvbnMyCQCVCgMFB2Jsb2NrZWQFBndoU2F2ZQUGYnBTYXZlAJrvlgU=", "height": 2605317, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3wQ8pjGoxB995d3EYL98dkcif5V53i2GoLKQSw62f6sH Next: GfMbtyAJ2t8HJDNRvwkUTqV4jqgibj3i3Ac2NcW23GhP Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = "__"
4+let a = take(drop(this.bytes, 1), 1)
55
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))
199 then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi'
20- else if ((base58'2T' == h))
10+ else if ((base58'2T' == c))
2111 then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63'
2212 else throw("Unknown chain")
2313 }
2414
25-let i = {
26- let h = f
27- if ((base58'2W' == h))
15+let d = {
16+ let c = a
17+ if ((base58'2W' == c))
2818 then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
29- else if ((base58'2T' == h))
19+ else if ((base58'2T' == c))
3020 then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
3121 else throw("Unknown chain")
3222 }
3323
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"], ""))
3581
3682
37-func m (l,n) = valueOrElse(getInteger(this, l), n)
83+let J = 1
84+
85+func K () = "%s__restConfig"
3886
3987
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"
4789
4890
49-func s () = "%s__restAddr"
91+func M (N) = split_4C(G(N, K()), e)
5092
5193
52-func t (u) = split_4C(j(u, r()), a)
94+func O (P,Q) = valueOrErrorMessage(addressFromString(P[Q]), ("Rest cfg doesn't contain address at index " + toString(Q)))
5395
5496
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))
56114
57115
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)
127117
128118
129-func ai (aj) = ("landOrder_" + aj)
119+func ad (ae) = ("stakedDuckByOwner_" + ae)
130120
131121
132-func ak (al) = ("stakedDuckByOwner_" + al)
122+func af (ag) = ("backPack_" + ag)
133123
134124
135-func am (an) = ("backPack_" + an)
125+func ah (ag) = ("duckLocation_" + ag)
136126
137127
138-func ao (an) = ("duckLocation_" + an)
128+func ai () = "contractsBlocked"
139129
140130
141-func ap () = "contractsBlocked"
131+func aj (ak) = ("nftOwner_" + ak)
142132
143133
144-func aq (ar) = ("nftOwner_" + ar)
134+func al (ak) = ("stakedTime_" + ak)
145135
146136
147-func as (ar) = ("stakedTime_" + ar)
137+func am (an) = ("accRefBy_" + an)
148138
149139
150-func at (au) = ("accRefBy_" + au)
140+let ao = 0
151141
142+let ap = 1
152143
153-let av = 0
144+let aq = 2
154145
155-let aw = 1
146+let ar = 0
156147
157-let ax = 2
148+let as = 1
158149
159-let ay = 0
150+let at = 2
160151
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"))
194155 then {
195- let aQ = h
196- aQ
156+ let aw = c
157+ aw
197158 }
198159 else throw("fail to cast into String")
199160 }
200161
201162
202-func aR (aS) = {
203- let aT = split(valueOrElse(getString(aS), "0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:"), ":")
204-[if ((size(split(aT[aL], "_")) == B))
205- then aT[aL]
206- else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split(aT[aM], "_")) == B))
207- then aT[aM]
208- else "0@0_0@0_0@0_0@0_0@0_0@0", aT[aN]]
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]]
209170 }
210171
211172
212-func aU (aV,aW,aX) = if (aX)
173+func aA (aB,aC,aD) = if (aD)
213174 then {
214- let aY = if ((aV >= 0))
215- then (((aV + aW) - 1) / aW)
216- else -((((-(aV) + aW) - 1) / aW))
217- (aY * d)
175+ let aE = if ((aB >= 0))
176+ then (((aB + aC) - 1) / aC)
177+ else -((((-(aB) + aC) - 1) / aC))
178+ (aE * h)
218179 }
219- else aV
180+ else aB
220181
221182
222-func aZ (ba,ah,aV,bb) = {
223- let bc = af(ba, ah)
224- let bd = valueOrElse(getInteger(bc), 0)
225- let be = if ((bd > C))
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))
226187 then 0
227- else if (((bd + aV) > C))
228- then (C - bd)
229- else aV
230- let bf = (fraction(be, ((F * D) - fraction(((100 * bd) + (50 * be)), D, C)), e) + fraction((aV - be), D, d))
231- let bg = (bb - (bb / 100))
232- if (((bg * aV) > (bf * d)))
233- then throw((((((((((("Actual price = " + toString(bf)) + " / ") + toString(aV)) + " < minPrice = ") + toString(bb)) + ", (") + ba) + ", ") + M[ah]) + ")"))
234- else $Tuple2(IntegerEntry(bc, (bd + aV)), bf)
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)
235196 }
236197
237198
238-func bh (ba,bi,aV,bj) = {
239- let bc = af(ba, bi)
240- let bd = valueOrElse(getInteger(bc), 0)
241- let bk = if ((bd > C))
242- then min([aV, (bd - C)])
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)])
243204 else 0
244- let bl = min([bd, (aV - bk)])
245- let bm = (bl + bk)
246- let bn = (fraction(bl, ((G * D) - fraction(((100 * bd) - (50 * bl)), D, C)), e) + fraction(bk, (2 * D), d))
247- let bo = (bj + (bj / 100))
248- if (((bn * d) > (bo * bm)))
249- then throw((((((((((("Actual price = " + toString(bn)) + " / ") + toString(bm)) + " > maxPrice = ") + toString(bj)) + ", (") + ba) + ", ") + N[bi]) + ")"))
250- else $Tuple3(IntegerEntry(bc, (bd - bm)), bn, bm)
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)
251212 }
252213
253214
254-func bp (bq) = {
255- let aT = split(valueOrElse(getString(z, bq), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":")
256-[toString(valueOrElse(parseInt(aT[ay]), 0)), if ((size(split(aT[az], "_")) == B))
257- then aT[az]
258- else "0_0_0_0_0_0", if ((size(split(aT[aA], "_")) == B))
259- then aT[aA]
260- else "0_0_0_0_0_0", aT[aB]]
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]]
261222 }
262223
263224
264-func br () = if (valueOrElse(getBoolean(z, ap()), false))
225+func aX () = if (valueOrElse(getBoolean(S, ai()), false))
265226 then throw("Contracts are under maintenance")
266227 else unit
267228
268229
269-func bs (bt,bu) = {
270- let bv = bt._1
271- let bw = bt._8
272- let aW = if (bw)
273- then parseIntValue(split(Q[bv], "_")[ad])
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])
274235 else 0
275- let bx = split(bu, "@")
276- if ((size(bx) != 2))
236+ let bd = split(ba, "@")
237+ if ((size(bd) != 2))
277238 then throw("Incorrect order format, should be amount@price")
278239 else {
279- let by = parseIntValue(bx[0])
280- let bz = parseIntValue(bx[1])
281- let bA = fraction(by, bz, d)
282- let bB = aU(by, aW, bw)
283- let bC = if ((size(bt._6) > bv))
284- then parseIntValue(bt._6[bv])
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])
285246 else 0
286- let bD = split(if ((size(bt._7) > bv))
287- then bt._7[bv]
247+ let bj = split(if ((size(aZ._7) > bb))
248+ then aZ._7[bb]
288249 else "0@0", "@")
289- let bE = parseIntValue(bD[0])
290- let bF = parseIntValue(bD[1])
291- if (if ((0 > bF))
250+ let bk = parseIntValue(bj[0])
251+ let bl = parseIntValue(bj[1])
252+ if (if ((0 > bl))
292253 then true
293- else (0 > bz))
254+ else (0 > bf))
294255 then throw("Price can't be negative")
295256 else {
296- let bG = fraction(bE, bF, d)
297- let bH = aU(bE, aW, bw)
298- if ((by == 0))
299- then if ((bE > 0))
300- then $Tuple8((bv + 1), (bt._2 :+ toString(bC)), bt._3, bt._4, (bt._5 - bG), bt._6, bt._7, bw)
301- else $Tuple8((bv + 1), (bt._2 :+ toString((bC - bE))), bt._3, bt._4, bt._5, bt._6, bt._7, bw)
302- else if ((by > 0))
303- then if ((0 > bE))
304- then $Tuple8((bv + 1), (bt._2 :+ toString((bC - bE))), (bt._3 + bB), bt._4, (bt._5 + bA), bt._6, bt._7, bw)
305- else $Tuple8((bv + 1), (bt._2 :+ toString(bC)), (bt._3 + bB), bt._4, ((bt._5 + bA) - bG), bt._6, bt._7, bw)
306- else if ((0 > bE))
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))
307268 then {
308- let bI = (bE - by)
309- if ((0 > (bC - bI)))
310- then throw((((("Attempt to take " + toString(bI)) + " from warehouse, but only ") + toString(bC)) + " available"))
311- else $Tuple8((bv + 1), (bt._2 :+ toString((bC - bI))), bt._3, (bt._4 - bB), bt._5, bt._6, bt._7, bw)
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)
312273 }
313- else if ((0 > (bC + by)))
314- then throw((((("Attempt to take " + toString(-(by))) + " from warehouse, but only ") + toString(bC)) + " available"))
315- else $Tuple8((bv + 1), (bt._2 :+ toString((bC + by))), bt._3, (bt._4 - bB), (bt._5 - bG), bt._6, bt._7, bw)
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)
316277 }
317278 }
318279 }
319280
320281
321-func bJ (bK,bL,bM) = {
322- let bN = split(bK[aD], "_")
323- let bO = split(bK[aE], "_")
324- let bP = if ((bK[aF] == ""))
282+func bp (bq,br,bs) = {
283+ let bt = split(bq[v], "_")
284+ let bu = split(bq[w], "_")
285+ let bv = if ((bq[x] == ""))
325286 then nil
326- else split(bK[aF], "_")
327- let bQ = split(bL[aL], "_")
328- let bR = split(bL[aM], "_")
329- let bS = if ((bL[aN] == ""))
287+ else split(bq[x], "_")
288+ let bw = split(br[ar], "_")
289+ let bx = split(br[as], "_")
290+ let by = if ((br[at] == ""))
330291 then nil
331- else split(bL[aN], "_")
332- if ((size(bM) != 3))
333- then throw("cargoListStr should contain exactly 2 ':' separators")
292+ else split(br[at], "_")
293+ if ((size(bs) != 3))
294+ then throw("newOrderStr should contain exactly 2 ':' separators")
334295 else {
335- let bT = split(bM[0], "_")
336- let bU = split(bM[1], "_")
337- let bV = if ((bM[2] == ""))
296+ let bz = split(bs[0], "_")
297+ let bA = split(bs[1], "_")
298+ let bB = if ((bs[2] == ""))
338299 then nil
339- else split(bM[2], "_")
340- if ((size(bT) != B))
300+ else split(bs[2], "_")
301+ if ((size(bz) != k))
341302 then throw("All 6 resources should be passed")
342- else if ((size(bU) != B))
303+ else if ((size(bA) != k))
343304 then throw("All 6 materials should be passed")
344305 else {
345- let bW = {
346- let bX = bT
347- let bY = size(bX)
348- let bZ = $Tuple8(0, nil, 0, 0, 0, bN, bQ, false)
349- func ca (cb,cc) = if ((cc >= bY))
350- then cb
351- else bs(cb, bX[cc])
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])
352313
353- func cd (cb,cc) = if ((cc >= bY))
354- then cb
314+ func bJ (bH,bI) = if ((bI >= bE))
315+ then bH
355316 else throw("List size exceeds 6")
356317
357- cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6)
318+ bJ(bG(bG(bG(bG(bG(bG(bF, 0), 1), 2), 3), 4), 5), 6)
358319 }
359- let bm = {
360- let bX = bU
361- let bY = size(bX)
362- let bZ = $Tuple8(0, nil, bW._3, bW._4, bW._5, bO, bR, false)
363- func ce (cb,cc) = if ((cc >= bY))
364- then cb
365- else bs(cb, bX[cc])
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])
366327
367- func cf (cb,cc) = if ((cc >= bY))
368- then cb
328+ func bL (bH,bI) = if ((bI >= bE))
329+ then bH
369330 else throw("List size exceeds 6")
370331
371- cf(ce(ce(ce(ce(ce(ce(bZ, 0), 1), 2), 3), 4), 5), 6)
332+ bL(bK(bK(bK(bK(bK(bK(bF, 0), 1), 2), 3), 4), 5), 6)
372333 }
373- let aT = if ((size(bV) != 0))
334+ let az = if ((size(bB) != 0))
374335 then {
375- let bX = bV
376- let bY = size(bX)
377- let bZ = $Tuple8(0, nil, bm._3, bm._4, bm._5, bP, bS, true)
378- func cg (cb,cc) = if ((cc >= bY))
379- then cb
380- else bs(cb, bX[cc])
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])
381342
382- func ch (cb,cc) = if ((cc >= bY))
383- then cb
343+ func bN (bH,bI) = if ((bI >= bE))
344+ then bH
384345 else throw("List size exceeds 50")
385346
386- 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)
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)
387348 }
388- else $Tuple8(0, bP, bm._3, bm._4, bm._5, bP, bS, true)
389- $Tuple6(bW._2, bm._2, aT._2, aT._3, aT._4, aT._5)
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)
390351 }
391352 }
392353 }
393354
394355
395-func ci (bt,cj) = {
396- let bv = bt._7
397- let bw = bt._12
398- let aW = if (bw)
399- then parseIntValue(split(Q[bv], "_")[ad])
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])
400361 else 0
401- let ck = split(cj, "@")
402- if ((size(ck) != 2))
362+ let bQ = split(bP, "@")
363+ if ((size(bQ) != 2))
403364 then throw("Incorrect order format, should be amount@price")
404365 else {
405- let cl = parseIntValue(ck[0])
406- let cm = parseIntValue(ck[1])
407- if ((0 > cm))
366+ let bR = parseIntValue(bQ[0])
367+ let bS = parseIntValue(bQ[1])
368+ if ((0 > bS))
408369 then throw("Price can't be negative")
409370 else {
410- let cn = fraction(cl, cm, d)
411- let co = if ((size(bt._8) > bv))
412- then parseIntValue(bt._8[bv])
371+ let bT = fraction(bR, bS, h)
372+ let bU = if ((size(aZ._8) > bb))
373+ then parseIntValue(aZ._8[bb])
413374 else 0
414- let bC = if ((size(bt._9) > bv))
415- then parseIntValue(bt._9[bv])
375+ let bi = if ((size(aZ._9) > bb))
376+ then parseIntValue(aZ._9[bb])
416377 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)
422386 else false)
423- then throw(((((("Prices of " + bt._11[bv]) + " don't match! WH price=") + toString(cr)) + ", your price=") + toString(cm)))
387+ then throw(((((("Prices of " + aZ._11[bb]) + " don't match! WH price=") + toString(bY)) + ", your price=") + toString(bS)))
424388 else {
425- let cs = fraction(cq, cr, d)
426- let ct = aU(cl, aW, bw)
427- if ((cl == 0))
428- then $Tuple12((bt._1 :+ toString(bC)), (bt._2 :+ bt._10[bv]), (bt._3 :+ toString(co)), bt._4, bt._5, bt._6, (bt._7 + 1), bt._8, bt._9, bt._10, bt._11, bw)
429- else if ((cl > 0))
430- then if ((0 > cq))
431- then if ((cl > -(cq)))
432- then throw(((((("Attempt to buy " + toString(cl)) + " of ") + bt._11[bv]) + ", but warehouse only sells ") + toString(-(cq))))
433- else $Tuple12((bt._1 :+ toString(bC)), (bt._2 :+ ((toString((cq + cl)) + "@") + toString(cr))), (bt._3 :+ toString((co + cl))), (bt._4 + ct), bt._5, (bt._6 + cn), (bt._7 + 1), bt._8, bt._9, bt._10, bt._11, bw)
434- else throw((("Attempt to buy " + bt._11[bv]) + " while warehouse doesn't sell it"))
435- else if ((cq > 0))
436- then if ((-(cl) > cq))
437- then throw(((((("Attempt to sell " + toString(-(cl))) + " of ") + bt._11[bv]) + ", but warehouse only buys ") + toString(cq)))
438- else if ((-(cl) > co))
439- then throw(((((("Attempt to sell " + toString(-(cl))) + ", but you only have ") + toString(co)) + " of ") + bt._11[bv]))
440- else $Tuple12((bt._1 :+ toString((bC - cl))), (bt._2 :+ ((toString((cq + cl)) + "@") + toString(cr))), (bt._3 :+ toString((co + cl))), (bt._4 - ct), (bt._5 - cn), bt._6, (bt._7 + 1), bt._8, bt._9, bt._10, bt._11, bw)
441- else throw((("Attempt to sell " + bt._11[bv]) + " while warehouse doesn't buy it"))
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"))
442406 }
443407 }
444408 }
445409 }
446410
447411
448-@Callable(cu)
449-func recalcLockedVolumeREADONLY (aj,cv) = {
450- let bL = aR(ai(aj))
451- let cw = bJ(cv, bL, bL)
452- $Tuple2(nil, (cw._4 + cw._5))
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))
453417 }
454418
455419
456420
457-@Callable(cu)
458-func constructorV1 (cx) = if ((cu.caller != this))
421+@Callable(cb)
422+func constructorV1 (ce) = if ((cb.caller != this))
459423 then throw("Permission denied")
460- else [StringEntry(s(), cx)]
424+ else [StringEntry(L(), ce)]
461425
462426
463427
464-@Callable(cu)
465-func sellResources (cy,cz) = {
466- let cA = br()
467- if ((cA == cA))
428+@Callable(cb)
429+func sellResources (cf,cg) = {
430+ let ch = aX()
431+ if ((ch == ch))
468432 then {
469- let an = valueOrErrorMessage(getString(z, ak(toString(cu.caller))), "You don't have a duck staked")
470- if ((size(cu.payments) != 0))
433+ let ag = valueOrErrorMessage(getString(S, ad(toString(cb.caller))), "You don't have a duck staked")
434+ if ((size(cb.payments) != 0))
471435 then throw("sellResources doesn't require any payments")
472436 else {
473- let cB = split(valueOrElse(getString(z, ao(an)), A), "_")
474- if ((cB[aw] != "F"))
475- then throw(("Duck location type should be Factory, but is " + cB[aw]))
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]))
476440 else {
477- let ba = cB[ax]
478- let cC = bp(am(an))
479- let cD = split(cC[az], "_")
480- func cE (bt,bv) = if ((cy[bv] > parseIntValue(cD[bv])))
481- then throw(((((("You have " + cD[bv]) + " of ") + M[bv]) + ", but tried to sell ") + toString(cy[bv])))
482- else if ((0 > cy[bv]))
483- then throw(((("You tried to sell negative amount of " + M[bv]) + ": ") + toString(cy[bv])))
484- else if ((cy[bv] > 0))
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))
485449 then {
486- let cF = aZ(ba, bv, cy[bv], cz[bv])
487- $Tuple3((bt._1 :+ cF._1), (bt._2 :+ toString((parseIntValue(cD[bv]) - cy[bv]))), (bt._3 + cF._2))
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))
488452 }
489- else $Tuple3(bt._1, (bt._2 :+ cD[bv]), bt._3)
453+ else $Tuple3(aZ._1, (aZ._2 :+ ck[bb]), aZ._3)
490454
491- let cG = {
492- let bX = [0, 1, 2, 3, 4, 5]
493- let bY = size(bX)
494- let bZ = $Tuple3(nil, nil, 0)
495- func ca (cb,cc) = if ((cc >= bY))
496- then cb
497- else cE(cb, bX[cc])
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])
498462
499- func cd (cb,cc) = if ((cc >= bY))
500- then cb
463+ func bJ (bH,bI) = if ((bI >= bE))
464+ then bH
501465 else throw("List size exceeds 6")
502466
503- cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6)
467+ bJ(bG(bG(bG(bG(bG(bG(bF, 0), 1), 2), 3), 4), 5), 6)
504468 }
505- let cH = makeString([cC[ay], makeString(cG._2, "_"), cC[aA], cC[aB]], ":")
506- let cI = aO(invoke(z, "updateBackpack", [an, cH], nil))
507- $Tuple2((cG._1 :+ ScriptTransfer(cu.caller, cG._3, g)), cI)
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)
508472 }
509473 }
510474 }
513477
514478
515479
516-@Callable(cu)
517-func buyMaterials (cy,cJ) = {
518- let cA = br()
519- if ((cA == cA))
480+@Callable(cb)
481+func buyMaterials (cf,cq) = {
482+ let ch = aX()
483+ if ((ch == ch))
520484 then {
521- let an = valueOrErrorMessage(getString(z, ak(toString(cu.caller))), "You don't have a duck staked")
522- if ((size(cu.payments) != 1))
485+ let ag = valueOrErrorMessage(getString(S, ad(toString(cb.caller))), "You don't have a duck staked")
486+ if ((size(cb.payments) != 1))
523487 then throw("exactly 1 payment must be attached")
524488 else {
525- let cK = cu.payments[0]
526- let cL = cK.amount
527- let cM = valueOrErrorMessage(cK.assetId, "WAVES can't be used as payment")
528- if ((cM != g))
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))
529493 then throw("USDT payments only!")
530494 else {
531- let cB = split(valueOrElse(getString(z, ao(an)), A), "_")
532- if ((cB[aw] != "F"))
533- then throw(("Duck location type should be Factory, but is " + cB[aw]))
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]))
534498 else {
535- let ba = cB[ax]
536- let cC = bp(am(an))
537- let cN = split(cC[aA], "_")
538- func cO (bt,bv) = if ((0 > cy[bv]))
539- then throw(((("You tried to buy negative amount of " + N[bv]) + ": ") + toString(cy[bv])))
540- else if ((cy[bv] > 0))
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))
541505 then {
542- let cF = bh(ba, bv, cy[bv], cJ[bv])
543- $Tuple3((bt._1 :+ cF._1), (bt._2 :+ toString((parseIntValue(cN[bv]) + cF._3))), (bt._3 + cF._2))
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))
544508 }
545- else $Tuple3(bt._1, (bt._2 :+ cN[bv]), bt._3)
509+ else $Tuple3(aZ._1, (aZ._2 :+ cu[bb]), aZ._3)
546510
547- let cG = {
548- let bX = [0, 1, 2, 3, 4, 5]
549- let bY = size(bX)
550- let bZ = $Tuple3(nil, nil, 0)
551- func ca (cb,cc) = if ((cc >= bY))
552- then cb
553- else cO(cb, bX[cc])
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])
554518
555- func cd (cb,cc) = if ((cc >= bY))
556- then cb
519+ func bJ (bH,bI) = if ((bI >= bE))
520+ then bH
557521 else throw("List size exceeds 6")
558522
559- cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6)
523+ bJ(bG(bG(bG(bG(bG(bG(bF, 0), 1), 2), 3), 4), 5), 6)
560524 }
561- if ((cG._3 > cL))
562- then throw(((("Insufficient payment! Attached=" + toString(cL)) + ", required=") + toString(cG._3)))
525+ if ((cn._3 > cs))
526+ then throw(((("Insufficient payment! Attached=" + toString(cs)) + ", required=") + toString(cn._3)))
563527 else {
564- let cH = makeString([cC[ay], cC[az], makeString(cG._2, "_"), cC[aB]], ":")
565- let cI = aO(invoke(z, "updateBackpack", [an, cH], nil))
566- let u = if (((cL - cG._3) > 0))
567- then [ScriptTransfer(cu.caller, (cL - cG._3), g)]
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)]
568532 else nil
569- let cP = (cG._3 / 100)
570- $Tuple2(((cG._1 ++ u) :+ ScriptTransfer(y, cP, g)), cI)
533+ let cw = (cn._3 / 100)
534+ $Tuple2(((cn._1 ++ N) :+ ScriptTransfer(R, cw, b)), cp)
571535 }
572536 }
573537 }
578542
579543
580544
581-@Callable(cu)
582-func exchangeResources (cy) = {
583- let cA = br()
584- if ((cA == cA))
545+@Callable(cb)
546+func exchangeResources (cf) = {
547+ let ch = aX()
548+ if ((ch == ch))
585549 then {
586- let an = valueOrErrorMessage(getString(z, ak(toString(cu.caller))), "You don't have a duck staked")
587- if ((size(cu.payments) != 1))
550+ let ag = valueOrErrorMessage(getString(S, ad(toString(cb.caller))), "You don't have a duck staked")
551+ if ((size(cb.payments) != 1))
588552 then throw("exactly 1 payment must be attached")
589553 else {
590- let cK = cu.payments[0]
591- let cL = cK.amount
592- let cM = valueOrErrorMessage(cK.assetId, "WAVES can't be used as payment")
593- if ((cM != g))
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))
594558 then throw("USDT payments only!")
595559 else {
596- let cB = split(valueOrElse(getString(z, ao(an)), A), "_")
597- if ((cB[aw] != "F"))
598- then throw(("Duck location type should be Factory, but is " + cB[aw]))
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]))
599563 else {
600- let ba = cB[ax]
601- let cC = bp(am(an))
602- let cD = split(cC[az], "_")
603- let cN = split(cC[aA], "_")
604- func cQ (bt,bv) = {
605- let bc = af(ba, bv)
606- let bd = valueOrElse(getInteger(bc), 0)
607- let cR = cy[bv]
608- if ((cR > parseIntValue(cD[bv])))
609- then throw(((((("You have " + cD[bv]) + " of ") + M[bv]) + ", but tried to exchange ") + toString(cR)))
610- else if ((0 > cR))
611- then throw(((("You tried to exchange negative amount of " + M[bv]) + ": ") + toString(cR)))
612- else if ((cR > 0))
613- then $Tuple4((bt._1 :+ toString((parseIntValue(cD[bv]) - cR))), (bt._2 :+ toString((parseIntValue(cN[bv]) + cR))), (bt._3 + fraction(cR, D, d)), (bt._4 :+ IntegerEntry(bc, bd)))
614- else $Tuple4((bt._1 :+ cD[bv]), (bt._2 :+ cN[bv]), bt._3, bt._4)
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)
615579 }
616580
617- let cG = {
618- let bX = [0, 1, 2, 3, 4, 5]
619- let bY = size(bX)
620- let bZ = $Tuple4(nil, nil, 0, nil)
621- func ca (cb,cc) = if ((cc >= bY))
622- then cb
623- else cQ(cb, bX[cc])
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])
624588
625- func cd (cb,cc) = if ((cc >= bY))
626- then cb
589+ func bJ (bH,bI) = if ((bI >= bE))
590+ then bH
627591 else throw("List size exceeds 6")
628592
629- cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6)
593+ bJ(bG(bG(bG(bG(bG(bG(bF, 0), 1), 2), 3), 4), 5), 6)
630594 }
631- if ((cG._3 > cL))
632- then throw(((("Insufficient payment! Attached=" + toString(cL)) + ", required=") + toString(cG._3)))
595+ if ((cn._3 > cs))
596+ then throw(((("Insufficient payment! Attached=" + toString(cs)) + ", required=") + toString(cn._3)))
633597 else {
634- let cH = makeString([cC[ay], makeString(cG._1, "_"), makeString(cG._2, "_"), cC[aB]], ":")
635- let cI = aO(invoke(z, "updateBackpack", [an, cH], nil))
636- let u = if (((cL - cG._3) > 0))
637- then [ScriptTransfer(cu.caller, (cL - cG._3), g)]
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)]
638602 else nil
639- let cP = (cG._3 / 100)
640- $Tuple2(((u ++ cG._4) :+ ScriptTransfer(y, cP, g)), cI)
603+ let cw = (cn._3 / 100)
604+ $Tuple2(((N ++ cn._4) :+ ScriptTransfer(R, cw, b)), cp)
641605 }
642606 }
643607 }
648612
649613
650614
651-@Callable(cu)
652-func craftGoods (cS,cT) = {
653- let cA = br()
654- if ((cA == cA))
655- then if ((size(cu.payments) != 1))
615+@Callable(cb)
616+func craftGoods (cz,cA) = {
617+ let ch = aX()
618+ if ((ch == ch))
619+ then if ((size(cb.payments) != 1))
656620 then throw("exactly 1 payment must be attached")
657621 else {
658- let cK = cu.payments[0]
659- let cL = cK.amount
660- let cM = valueOrErrorMessage(cK.assetId, "WAVES can't be used as payment")
661- if ((cM != g))
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))
662626 then throw("USDT payments only!")
663- else if ((cL != b))
627+ else if ((cs != f))
664628 then throw("exactly 1 USDT must be attached as payment")
665- else if ((0 >= cT))
629+ else if ((0 >= cA))
666630 then throw("Quantity should be positive")
667631 else {
668- let an = valueOrErrorMessage(getString(z, ak(toString(cu.caller))), "You don't have a duck staked")
669- let cB = split(valueOrElse(getString(z, ao(an)), A), "_")
670- if ((cB[aw] != "M"))
671- then throw(("Duck location type should be Manufactory, but is " + cB[aw]))
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]))
672636 else {
673- let cU = cB[av]
674- let cC = bp(am(an))
675- let cN = split(cC[aA], "_")
676- if (if ((0 > cS))
637+ let cB = ci[ao]
638+ let cj = aV(af(ag))
639+ let cu = split(cj[E], "_")
640+ if (if ((0 > cz))
677641 then true
678- else (cS >= size(Q)))
679- then throw(("Unknown product idx=" + toString(cS)))
642+ else (cz >= size(r)))
643+ then throw(("Unknown product idx=" + toString(cz)))
680644 else {
681- let cV = split(Q[cS], "_")
682- if ((size(cV) != (B + 3)))
683- then throw(("Fatal: unknown recipe: " + Q[cS]))
645+ let cC = split(r[cz], "_")
646+ if ((size(cC) != (k + 3)))
647+ then throw(("Fatal: unknown recipe: " + r[cz]))
684648 else {
685- let cW = parseIntValue(cV[ae])
686- if ((P[cW] != cU))
687- then throw(((("This product is available in " + P[cW]) + ", but you are in ") + cU))
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))
688652 else {
689- let cX = if ((cC[aB] == ""))
653+ let cE = if ((cj[F] == ""))
690654 then nil
691- else split(cC[aB], "_")
692- func cY (bt,cZ) = {
693- let da = bt._2
694- let db = if ((size(cX) > da))
695- then cX[da]
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]
696660 else "0"
697- let dc = parseIntValue(db)
698- let aV = (cT * parseIntValue(cV[ad]))
699- let dd = if ((da == cS))
700- then toString((dc + aV))
701- else db
702- $Tuple2((bt._1 :+ dd), (da + 1))
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))
703667 }
704668
705- let de = ( let bX = Q
706- let bY = size(bX)
707- let bZ = $Tuple2(nil, 0)
708- func ca (cb,cc) = if ((cc >= bY))
709- then cb
710- else cY(cb, bX[cc])
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])
711675
712- func cd (cb,cc) = if ((cc >= bY))
713- then cb
676+ func bJ (bH,bI) = if ((bI >= bE))
677+ then bH
714678 else throw("List size exceeds 50")
715679
716- cd(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(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))._1
717- func df (bt,bv) = {
718- let dg = ((parseIntValue(cV[bv]) * c) * cT)
719- let dh = parseIntValue(cN[bv])
720- if ((dg > dh))
721- then throw(((((((("You have " + cN[bv]) + " of ") + N[bv]) + ", but recipe requires ") + toString(dg)) + " for quantity ") + toString(cT)))
722- else if ((dg > 0))
723- then (bt :+ toString((dh - dg)))
724- else (bt :+ cN[bv])
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])
725689 }
726690
727- let cG = {
728- let bX = [0, 1, 2, 3, 4, 5]
729- let bY = size(bX)
730- let bZ = nil
731- func ce (cb,cc) = if ((cc >= bY))
732- then cb
733- else df(cb, bX[cc])
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])
734698
735- func cf (cb,cc) = if ((cc >= bY))
736- then cb
699+ func bL (bH,bI) = if ((bI >= bE))
700+ then bH
737701 else throw("List size exceeds 6")
738702
739- cf(ce(ce(ce(ce(ce(ce(bZ, 0), 1), 2), 3), 4), 5), 6)
703+ bL(bK(bK(bK(bK(bK(bK(bF, 0), 1), 2), 3), 4), 5), 6)
740704 }
741- let cH = makeString([cC[ay], cC[az], makeString(cG, "_"), makeString(de, "_")], ":")
742- let cI = aO(invoke(z, "updateBackpack", [an, cH], nil))
743- $Tuple2(nil, cI)
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)
744708 }
745709 }
746710 }
752716
753717
754718
755-@Callable(cu)
756-func setWarehouseOrder (di,aj) = {
757- let dj = cu.originCaller
758- let au = toString(dj)
759- let cI = if ((dj != y))
760- then br()
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()
761725 else false
762- let dk = value(assetInfo(fromBase58String(aj)))
763- if (!(isDefined(getInteger(z, as(aj)))))
764- then throw((("NFT " + dk.name) + " is not staked"))
726+ let cR = value(assetInfo(fromBase58String(ac)))
727+ if (!(isDefined(getInteger(S, al(ac)))))
728+ then throw((("NFT " + cR.name) + " is not staked"))
765729 else {
766- let dl = valueOrErrorMessage(getString(z, aq(aj)), (("NFT " + dk.name) + " is orphaned"))
767- if (if ((dj != y))
768- then (dl != au)
730+ let cS = valueOrErrorMessage(getString(S, aj(ac)), (("NFT " + cR.name) + " is orphaned"))
731+ if (if ((cQ != R))
732+ then (cS != an)
769733 else false)
770- then throw((H + " is not yours"))
734+ then throw((j + " is not yours"))
771735 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)]
816767 }
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+ }
819777 }
820778 }
821779 }
822780
823781
824782
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"))
839799 else {
840- let dD = value(assetInfo(fromBase58String(aj)))
841- if (!(isDefined(getInteger(z, as(aj)))))
842- then throw((("NFT " + dD.name) + " is not staked"))
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")
843803 else {
844- let dE = valueOrErrorMessage(getString(z, aq(aj)), (("NFT " + dD.name) + " is orphaned"))
845- if ((dE == dA))
846- then throw("You cannot trade with yourself")
804+ let dm = split_4C(df, ":")
805+ if ((size(dm) != 3))
806+ then throw("bpOrderStr should contain exactly 2 ':' separators")
847807 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])
891847
892- func cd (cb,cc) = if ((cc >= bY))
893- then cb
894- else throw("List size exceeds 6")
848+ func bJ (bH,bI) = if ((bI >= bE))
849+ then bH
850+ else throw("List size exceeds 6")
895851
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+ }
897927 }
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+ }
985933 }
986934 }
987935 }
988- }
989- else throw("Strict value is not equal to itself.")
936+ }
990937 }
991938
992939
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = "__"
4+let a = take(drop(this.bytes, 1), 1)
55
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))
199 then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi'
20- else if ((base58'2T' == h))
10+ else if ((base58'2T' == c))
2111 then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63'
2212 else throw("Unknown chain")
2313 }
2414
25-let i = {
26- let h = f
27- if ((base58'2W' == h))
15+let d = {
16+ let c = a
17+ if ((base58'2W' == c))
2818 then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
29- else if ((base58'2T' == h))
19+ else if ((base58'2T' == c))
3020 then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
3121 else throw("Unknown chain")
3222 }
3323
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"], ""))
3581
3682
37-func m (l,n) = valueOrElse(getInteger(this, l), n)
83+let J = 1
84+
85+func K () = "%s__restConfig"
3886
3987
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"
4789
4890
49-func s () = "%s__restAddr"
91+func M (N) = split_4C(G(N, K()), e)
5092
5193
52-func t (u) = split_4C(j(u, r()), a)
94+func O (P,Q) = valueOrErrorMessage(addressFromString(P[Q]), ("Rest cfg doesn't contain address at index " + toString(Q)))
5395
5496
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))
56114
57115
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)
127117
128118
129-func ai (aj) = ("landOrder_" + aj)
119+func ad (ae) = ("stakedDuckByOwner_" + ae)
130120
131121
132-func ak (al) = ("stakedDuckByOwner_" + al)
122+func af (ag) = ("backPack_" + ag)
133123
134124
135-func am (an) = ("backPack_" + an)
125+func ah (ag) = ("duckLocation_" + ag)
136126
137127
138-func ao (an) = ("duckLocation_" + an)
128+func ai () = "contractsBlocked"
139129
140130
141-func ap () = "contractsBlocked"
131+func aj (ak) = ("nftOwner_" + ak)
142132
143133
144-func aq (ar) = ("nftOwner_" + ar)
134+func al (ak) = ("stakedTime_" + ak)
145135
146136
147-func as (ar) = ("stakedTime_" + ar)
137+func am (an) = ("accRefBy_" + an)
148138
149139
150-func at (au) = ("accRefBy_" + au)
140+let ao = 0
151141
142+let ap = 1
152143
153-let av = 0
144+let aq = 2
154145
155-let aw = 1
146+let ar = 0
156147
157-let ax = 2
148+let as = 1
158149
159-let ay = 0
150+let at = 2
160151
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"))
194155 then {
195- let aQ = h
196- aQ
156+ let aw = c
157+ aw
197158 }
198159 else throw("fail to cast into String")
199160 }
200161
201162
202-func aR (aS) = {
203- let aT = split(valueOrElse(getString(aS), "0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:"), ":")
204-[if ((size(split(aT[aL], "_")) == B))
205- then aT[aL]
206- else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split(aT[aM], "_")) == B))
207- then aT[aM]
208- else "0@0_0@0_0@0_0@0_0@0_0@0", aT[aN]]
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]]
209170 }
210171
211172
212-func aU (aV,aW,aX) = if (aX)
173+func aA (aB,aC,aD) = if (aD)
213174 then {
214- let aY = if ((aV >= 0))
215- then (((aV + aW) - 1) / aW)
216- else -((((-(aV) + aW) - 1) / aW))
217- (aY * d)
175+ let aE = if ((aB >= 0))
176+ then (((aB + aC) - 1) / aC)
177+ else -((((-(aB) + aC) - 1) / aC))
178+ (aE * h)
218179 }
219- else aV
180+ else aB
220181
221182
222-func aZ (ba,ah,aV,bb) = {
223- let bc = af(ba, ah)
224- let bd = valueOrElse(getInteger(bc), 0)
225- let be = if ((bd > C))
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))
226187 then 0
227- else if (((bd + aV) > C))
228- then (C - bd)
229- else aV
230- let bf = (fraction(be, ((F * D) - fraction(((100 * bd) + (50 * be)), D, C)), e) + fraction((aV - be), D, d))
231- let bg = (bb - (bb / 100))
232- if (((bg * aV) > (bf * d)))
233- then throw((((((((((("Actual price = " + toString(bf)) + " / ") + toString(aV)) + " < minPrice = ") + toString(bb)) + ", (") + ba) + ", ") + M[ah]) + ")"))
234- else $Tuple2(IntegerEntry(bc, (bd + aV)), bf)
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)
235196 }
236197
237198
238-func bh (ba,bi,aV,bj) = {
239- let bc = af(ba, bi)
240- let bd = valueOrElse(getInteger(bc), 0)
241- let bk = if ((bd > C))
242- then min([aV, (bd - C)])
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)])
243204 else 0
244- let bl = min([bd, (aV - bk)])
245- let bm = (bl + bk)
246- let bn = (fraction(bl, ((G * D) - fraction(((100 * bd) - (50 * bl)), D, C)), e) + fraction(bk, (2 * D), d))
247- let bo = (bj + (bj / 100))
248- if (((bn * d) > (bo * bm)))
249- then throw((((((((((("Actual price = " + toString(bn)) + " / ") + toString(bm)) + " > maxPrice = ") + toString(bj)) + ", (") + ba) + ", ") + N[bi]) + ")"))
250- else $Tuple3(IntegerEntry(bc, (bd - bm)), bn, bm)
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)
251212 }
252213
253214
254-func bp (bq) = {
255- let aT = split(valueOrElse(getString(z, bq), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":")
256-[toString(valueOrElse(parseInt(aT[ay]), 0)), if ((size(split(aT[az], "_")) == B))
257- then aT[az]
258- else "0_0_0_0_0_0", if ((size(split(aT[aA], "_")) == B))
259- then aT[aA]
260- else "0_0_0_0_0_0", aT[aB]]
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]]
261222 }
262223
263224
264-func br () = if (valueOrElse(getBoolean(z, ap()), false))
225+func aX () = if (valueOrElse(getBoolean(S, ai()), false))
265226 then throw("Contracts are under maintenance")
266227 else unit
267228
268229
269-func bs (bt,bu) = {
270- let bv = bt._1
271- let bw = bt._8
272- let aW = if (bw)
273- then parseIntValue(split(Q[bv], "_")[ad])
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])
274235 else 0
275- let bx = split(bu, "@")
276- if ((size(bx) != 2))
236+ let bd = split(ba, "@")
237+ if ((size(bd) != 2))
277238 then throw("Incorrect order format, should be amount@price")
278239 else {
279- let by = parseIntValue(bx[0])
280- let bz = parseIntValue(bx[1])
281- let bA = fraction(by, bz, d)
282- let bB = aU(by, aW, bw)
283- let bC = if ((size(bt._6) > bv))
284- then parseIntValue(bt._6[bv])
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])
285246 else 0
286- let bD = split(if ((size(bt._7) > bv))
287- then bt._7[bv]
247+ let bj = split(if ((size(aZ._7) > bb))
248+ then aZ._7[bb]
288249 else "0@0", "@")
289- let bE = parseIntValue(bD[0])
290- let bF = parseIntValue(bD[1])
291- if (if ((0 > bF))
250+ let bk = parseIntValue(bj[0])
251+ let bl = parseIntValue(bj[1])
252+ if (if ((0 > bl))
292253 then true
293- else (0 > bz))
254+ else (0 > bf))
294255 then throw("Price can't be negative")
295256 else {
296- let bG = fraction(bE, bF, d)
297- let bH = aU(bE, aW, bw)
298- if ((by == 0))
299- then if ((bE > 0))
300- then $Tuple8((bv + 1), (bt._2 :+ toString(bC)), bt._3, bt._4, (bt._5 - bG), bt._6, bt._7, bw)
301- else $Tuple8((bv + 1), (bt._2 :+ toString((bC - bE))), bt._3, bt._4, bt._5, bt._6, bt._7, bw)
302- else if ((by > 0))
303- then if ((0 > bE))
304- then $Tuple8((bv + 1), (bt._2 :+ toString((bC - bE))), (bt._3 + bB), bt._4, (bt._5 + bA), bt._6, bt._7, bw)
305- else $Tuple8((bv + 1), (bt._2 :+ toString(bC)), (bt._3 + bB), bt._4, ((bt._5 + bA) - bG), bt._6, bt._7, bw)
306- else if ((0 > bE))
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))
307268 then {
308- let bI = (bE - by)
309- if ((0 > (bC - bI)))
310- then throw((((("Attempt to take " + toString(bI)) + " from warehouse, but only ") + toString(bC)) + " available"))
311- else $Tuple8((bv + 1), (bt._2 :+ toString((bC - bI))), bt._3, (bt._4 - bB), bt._5, bt._6, bt._7, bw)
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)
312273 }
313- else if ((0 > (bC + by)))
314- then throw((((("Attempt to take " + toString(-(by))) + " from warehouse, but only ") + toString(bC)) + " available"))
315- else $Tuple8((bv + 1), (bt._2 :+ toString((bC + by))), bt._3, (bt._4 - bB), (bt._5 - bG), bt._6, bt._7, bw)
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)
316277 }
317278 }
318279 }
319280
320281
321-func bJ (bK,bL,bM) = {
322- let bN = split(bK[aD], "_")
323- let bO = split(bK[aE], "_")
324- let bP = if ((bK[aF] == ""))
282+func bp (bq,br,bs) = {
283+ let bt = split(bq[v], "_")
284+ let bu = split(bq[w], "_")
285+ let bv = if ((bq[x] == ""))
325286 then nil
326- else split(bK[aF], "_")
327- let bQ = split(bL[aL], "_")
328- let bR = split(bL[aM], "_")
329- let bS = if ((bL[aN] == ""))
287+ else split(bq[x], "_")
288+ let bw = split(br[ar], "_")
289+ let bx = split(br[as], "_")
290+ let by = if ((br[at] == ""))
330291 then nil
331- else split(bL[aN], "_")
332- if ((size(bM) != 3))
333- then throw("cargoListStr should contain exactly 2 ':' separators")
292+ else split(br[at], "_")
293+ if ((size(bs) != 3))
294+ then throw("newOrderStr should contain exactly 2 ':' separators")
334295 else {
335- let bT = split(bM[0], "_")
336- let bU = split(bM[1], "_")
337- let bV = if ((bM[2] == ""))
296+ let bz = split(bs[0], "_")
297+ let bA = split(bs[1], "_")
298+ let bB = if ((bs[2] == ""))
338299 then nil
339- else split(bM[2], "_")
340- if ((size(bT) != B))
300+ else split(bs[2], "_")
301+ if ((size(bz) != k))
341302 then throw("All 6 resources should be passed")
342- else if ((size(bU) != B))
303+ else if ((size(bA) != k))
343304 then throw("All 6 materials should be passed")
344305 else {
345- let bW = {
346- let bX = bT
347- let bY = size(bX)
348- let bZ = $Tuple8(0, nil, 0, 0, 0, bN, bQ, false)
349- func ca (cb,cc) = if ((cc >= bY))
350- then cb
351- else bs(cb, bX[cc])
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])
352313
353- func cd (cb,cc) = if ((cc >= bY))
354- then cb
314+ func bJ (bH,bI) = if ((bI >= bE))
315+ then bH
355316 else throw("List size exceeds 6")
356317
357- cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6)
318+ bJ(bG(bG(bG(bG(bG(bG(bF, 0), 1), 2), 3), 4), 5), 6)
358319 }
359- let bm = {
360- let bX = bU
361- let bY = size(bX)
362- let bZ = $Tuple8(0, nil, bW._3, bW._4, bW._5, bO, bR, false)
363- func ce (cb,cc) = if ((cc >= bY))
364- then cb
365- else bs(cb, bX[cc])
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])
366327
367- func cf (cb,cc) = if ((cc >= bY))
368- then cb
328+ func bL (bH,bI) = if ((bI >= bE))
329+ then bH
369330 else throw("List size exceeds 6")
370331
371- cf(ce(ce(ce(ce(ce(ce(bZ, 0), 1), 2), 3), 4), 5), 6)
332+ bL(bK(bK(bK(bK(bK(bK(bF, 0), 1), 2), 3), 4), 5), 6)
372333 }
373- let aT = if ((size(bV) != 0))
334+ let az = if ((size(bB) != 0))
374335 then {
375- let bX = bV
376- let bY = size(bX)
377- let bZ = $Tuple8(0, nil, bm._3, bm._4, bm._5, bP, bS, true)
378- func cg (cb,cc) = if ((cc >= bY))
379- then cb
380- else bs(cb, bX[cc])
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])
381342
382- func ch (cb,cc) = if ((cc >= bY))
383- then cb
343+ func bN (bH,bI) = if ((bI >= bE))
344+ then bH
384345 else throw("List size exceeds 50")
385346
386- 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)
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)
387348 }
388- else $Tuple8(0, bP, bm._3, bm._4, bm._5, bP, bS, true)
389- $Tuple6(bW._2, bm._2, aT._2, aT._3, aT._4, aT._5)
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)
390351 }
391352 }
392353 }
393354
394355
395-func ci (bt,cj) = {
396- let bv = bt._7
397- let bw = bt._12
398- let aW = if (bw)
399- then parseIntValue(split(Q[bv], "_")[ad])
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])
400361 else 0
401- let ck = split(cj, "@")
402- if ((size(ck) != 2))
362+ let bQ = split(bP, "@")
363+ if ((size(bQ) != 2))
403364 then throw("Incorrect order format, should be amount@price")
404365 else {
405- let cl = parseIntValue(ck[0])
406- let cm = parseIntValue(ck[1])
407- if ((0 > cm))
366+ let bR = parseIntValue(bQ[0])
367+ let bS = parseIntValue(bQ[1])
368+ if ((0 > bS))
408369 then throw("Price can't be negative")
409370 else {
410- let cn = fraction(cl, cm, d)
411- let co = if ((size(bt._8) > bv))
412- then parseIntValue(bt._8[bv])
371+ let bT = fraction(bR, bS, h)
372+ let bU = if ((size(aZ._8) > bb))
373+ then parseIntValue(aZ._8[bb])
413374 else 0
414- let bC = if ((size(bt._9) > bv))
415- then parseIntValue(bt._9[bv])
375+ let bi = if ((size(aZ._9) > bb))
376+ then parseIntValue(aZ._9[bb])
416377 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)
422386 else false)
423- then throw(((((("Prices of " + bt._11[bv]) + " don't match! WH price=") + toString(cr)) + ", your price=") + toString(cm)))
387+ then throw(((((("Prices of " + aZ._11[bb]) + " don't match! WH price=") + toString(bY)) + ", your price=") + toString(bS)))
424388 else {
425- let cs = fraction(cq, cr, d)
426- let ct = aU(cl, aW, bw)
427- if ((cl == 0))
428- then $Tuple12((bt._1 :+ toString(bC)), (bt._2 :+ bt._10[bv]), (bt._3 :+ toString(co)), bt._4, bt._5, bt._6, (bt._7 + 1), bt._8, bt._9, bt._10, bt._11, bw)
429- else if ((cl > 0))
430- then if ((0 > cq))
431- then if ((cl > -(cq)))
432- then throw(((((("Attempt to buy " + toString(cl)) + " of ") + bt._11[bv]) + ", but warehouse only sells ") + toString(-(cq))))
433- else $Tuple12((bt._1 :+ toString(bC)), (bt._2 :+ ((toString((cq + cl)) + "@") + toString(cr))), (bt._3 :+ toString((co + cl))), (bt._4 + ct), bt._5, (bt._6 + cn), (bt._7 + 1), bt._8, bt._9, bt._10, bt._11, bw)
434- else throw((("Attempt to buy " + bt._11[bv]) + " while warehouse doesn't sell it"))
435- else if ((cq > 0))
436- then if ((-(cl) > cq))
437- then throw(((((("Attempt to sell " + toString(-(cl))) + " of ") + bt._11[bv]) + ", but warehouse only buys ") + toString(cq)))
438- else if ((-(cl) > co))
439- then throw(((((("Attempt to sell " + toString(-(cl))) + ", but you only have ") + toString(co)) + " of ") + bt._11[bv]))
440- else $Tuple12((bt._1 :+ toString((bC - cl))), (bt._2 :+ ((toString((cq + cl)) + "@") + toString(cr))), (bt._3 :+ toString((co + cl))), (bt._4 - ct), (bt._5 - cn), bt._6, (bt._7 + 1), bt._8, bt._9, bt._10, bt._11, bw)
441- else throw((("Attempt to sell " + bt._11[bv]) + " while warehouse doesn't buy it"))
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"))
442406 }
443407 }
444408 }
445409 }
446410
447411
448-@Callable(cu)
449-func recalcLockedVolumeREADONLY (aj,cv) = {
450- let bL = aR(ai(aj))
451- let cw = bJ(cv, bL, bL)
452- $Tuple2(nil, (cw._4 + cw._5))
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))
453417 }
454418
455419
456420
457-@Callable(cu)
458-func constructorV1 (cx) = if ((cu.caller != this))
421+@Callable(cb)
422+func constructorV1 (ce) = if ((cb.caller != this))
459423 then throw("Permission denied")
460- else [StringEntry(s(), cx)]
424+ else [StringEntry(L(), ce)]
461425
462426
463427
464-@Callable(cu)
465-func sellResources (cy,cz) = {
466- let cA = br()
467- if ((cA == cA))
428+@Callable(cb)
429+func sellResources (cf,cg) = {
430+ let ch = aX()
431+ if ((ch == ch))
468432 then {
469- let an = valueOrErrorMessage(getString(z, ak(toString(cu.caller))), "You don't have a duck staked")
470- if ((size(cu.payments) != 0))
433+ let ag = valueOrErrorMessage(getString(S, ad(toString(cb.caller))), "You don't have a duck staked")
434+ if ((size(cb.payments) != 0))
471435 then throw("sellResources doesn't require any payments")
472436 else {
473- let cB = split(valueOrElse(getString(z, ao(an)), A), "_")
474- if ((cB[aw] != "F"))
475- then throw(("Duck location type should be Factory, but is " + cB[aw]))
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]))
476440 else {
477- let ba = cB[ax]
478- let cC = bp(am(an))
479- let cD = split(cC[az], "_")
480- func cE (bt,bv) = if ((cy[bv] > parseIntValue(cD[bv])))
481- then throw(((((("You have " + cD[bv]) + " of ") + M[bv]) + ", but tried to sell ") + toString(cy[bv])))
482- else if ((0 > cy[bv]))
483- then throw(((("You tried to sell negative amount of " + M[bv]) + ": ") + toString(cy[bv])))
484- else if ((cy[bv] > 0))
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))
485449 then {
486- let cF = aZ(ba, bv, cy[bv], cz[bv])
487- $Tuple3((bt._1 :+ cF._1), (bt._2 :+ toString((parseIntValue(cD[bv]) - cy[bv]))), (bt._3 + cF._2))
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))
488452 }
489- else $Tuple3(bt._1, (bt._2 :+ cD[bv]), bt._3)
453+ else $Tuple3(aZ._1, (aZ._2 :+ ck[bb]), aZ._3)
490454
491- let cG = {
492- let bX = [0, 1, 2, 3, 4, 5]
493- let bY = size(bX)
494- let bZ = $Tuple3(nil, nil, 0)
495- func ca (cb,cc) = if ((cc >= bY))
496- then cb
497- else cE(cb, bX[cc])
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])
498462
499- func cd (cb,cc) = if ((cc >= bY))
500- then cb
463+ func bJ (bH,bI) = if ((bI >= bE))
464+ then bH
501465 else throw("List size exceeds 6")
502466
503- cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6)
467+ bJ(bG(bG(bG(bG(bG(bG(bF, 0), 1), 2), 3), 4), 5), 6)
504468 }
505- let cH = makeString([cC[ay], makeString(cG._2, "_"), cC[aA], cC[aB]], ":")
506- let cI = aO(invoke(z, "updateBackpack", [an, cH], nil))
507- $Tuple2((cG._1 :+ ScriptTransfer(cu.caller, cG._3, g)), cI)
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)
508472 }
509473 }
510474 }
511475 else throw("Strict value is not equal to itself.")
512476 }
513477
514478
515479
516-@Callable(cu)
517-func buyMaterials (cy,cJ) = {
518- let cA = br()
519- if ((cA == cA))
480+@Callable(cb)
481+func buyMaterials (cf,cq) = {
482+ let ch = aX()
483+ if ((ch == ch))
520484 then {
521- let an = valueOrErrorMessage(getString(z, ak(toString(cu.caller))), "You don't have a duck staked")
522- if ((size(cu.payments) != 1))
485+ let ag = valueOrErrorMessage(getString(S, ad(toString(cb.caller))), "You don't have a duck staked")
486+ if ((size(cb.payments) != 1))
523487 then throw("exactly 1 payment must be attached")
524488 else {
525- let cK = cu.payments[0]
526- let cL = cK.amount
527- let cM = valueOrErrorMessage(cK.assetId, "WAVES can't be used as payment")
528- if ((cM != g))
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))
529493 then throw("USDT payments only!")
530494 else {
531- let cB = split(valueOrElse(getString(z, ao(an)), A), "_")
532- if ((cB[aw] != "F"))
533- then throw(("Duck location type should be Factory, but is " + cB[aw]))
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]))
534498 else {
535- let ba = cB[ax]
536- let cC = bp(am(an))
537- let cN = split(cC[aA], "_")
538- func cO (bt,bv) = if ((0 > cy[bv]))
539- then throw(((("You tried to buy negative amount of " + N[bv]) + ": ") + toString(cy[bv])))
540- else if ((cy[bv] > 0))
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))
541505 then {
542- let cF = bh(ba, bv, cy[bv], cJ[bv])
543- $Tuple3((bt._1 :+ cF._1), (bt._2 :+ toString((parseIntValue(cN[bv]) + cF._3))), (bt._3 + cF._2))
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))
544508 }
545- else $Tuple3(bt._1, (bt._2 :+ cN[bv]), bt._3)
509+ else $Tuple3(aZ._1, (aZ._2 :+ cu[bb]), aZ._3)
546510
547- let cG = {
548- let bX = [0, 1, 2, 3, 4, 5]
549- let bY = size(bX)
550- let bZ = $Tuple3(nil, nil, 0)
551- func ca (cb,cc) = if ((cc >= bY))
552- then cb
553- else cO(cb, bX[cc])
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])
554518
555- func cd (cb,cc) = if ((cc >= bY))
556- then cb
519+ func bJ (bH,bI) = if ((bI >= bE))
520+ then bH
557521 else throw("List size exceeds 6")
558522
559- cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6)
523+ bJ(bG(bG(bG(bG(bG(bG(bF, 0), 1), 2), 3), 4), 5), 6)
560524 }
561- if ((cG._3 > cL))
562- then throw(((("Insufficient payment! Attached=" + toString(cL)) + ", required=") + toString(cG._3)))
525+ if ((cn._3 > cs))
526+ then throw(((("Insufficient payment! Attached=" + toString(cs)) + ", required=") + toString(cn._3)))
563527 else {
564- let cH = makeString([cC[ay], cC[az], makeString(cG._2, "_"), cC[aB]], ":")
565- let cI = aO(invoke(z, "updateBackpack", [an, cH], nil))
566- let u = if (((cL - cG._3) > 0))
567- then [ScriptTransfer(cu.caller, (cL - cG._3), g)]
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)]
568532 else nil
569- let cP = (cG._3 / 100)
570- $Tuple2(((cG._1 ++ u) :+ ScriptTransfer(y, cP, g)), cI)
533+ let cw = (cn._3 / 100)
534+ $Tuple2(((cn._1 ++ N) :+ ScriptTransfer(R, cw, b)), cp)
571535 }
572536 }
573537 }
574538 }
575539 }
576540 else throw("Strict value is not equal to itself.")
577541 }
578542
579543
580544
581-@Callable(cu)
582-func exchangeResources (cy) = {
583- let cA = br()
584- if ((cA == cA))
545+@Callable(cb)
546+func exchangeResources (cf) = {
547+ let ch = aX()
548+ if ((ch == ch))
585549 then {
586- let an = valueOrErrorMessage(getString(z, ak(toString(cu.caller))), "You don't have a duck staked")
587- if ((size(cu.payments) != 1))
550+ let ag = valueOrErrorMessage(getString(S, ad(toString(cb.caller))), "You don't have a duck staked")
551+ if ((size(cb.payments) != 1))
588552 then throw("exactly 1 payment must be attached")
589553 else {
590- let cK = cu.payments[0]
591- let cL = cK.amount
592- let cM = valueOrErrorMessage(cK.assetId, "WAVES can't be used as payment")
593- if ((cM != g))
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))
594558 then throw("USDT payments only!")
595559 else {
596- let cB = split(valueOrElse(getString(z, ao(an)), A), "_")
597- if ((cB[aw] != "F"))
598- then throw(("Duck location type should be Factory, but is " + cB[aw]))
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]))
599563 else {
600- let ba = cB[ax]
601- let cC = bp(am(an))
602- let cD = split(cC[az], "_")
603- let cN = split(cC[aA], "_")
604- func cQ (bt,bv) = {
605- let bc = af(ba, bv)
606- let bd = valueOrElse(getInteger(bc), 0)
607- let cR = cy[bv]
608- if ((cR > parseIntValue(cD[bv])))
609- then throw(((((("You have " + cD[bv]) + " of ") + M[bv]) + ", but tried to exchange ") + toString(cR)))
610- else if ((0 > cR))
611- then throw(((("You tried to exchange negative amount of " + M[bv]) + ": ") + toString(cR)))
612- else if ((cR > 0))
613- then $Tuple4((bt._1 :+ toString((parseIntValue(cD[bv]) - cR))), (bt._2 :+ toString((parseIntValue(cN[bv]) + cR))), (bt._3 + fraction(cR, D, d)), (bt._4 :+ IntegerEntry(bc, bd)))
614- else $Tuple4((bt._1 :+ cD[bv]), (bt._2 :+ cN[bv]), bt._3, bt._4)
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)
615579 }
616580
617- let cG = {
618- let bX = [0, 1, 2, 3, 4, 5]
619- let bY = size(bX)
620- let bZ = $Tuple4(nil, nil, 0, nil)
621- func ca (cb,cc) = if ((cc >= bY))
622- then cb
623- else cQ(cb, bX[cc])
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])
624588
625- func cd (cb,cc) = if ((cc >= bY))
626- then cb
589+ func bJ (bH,bI) = if ((bI >= bE))
590+ then bH
627591 else throw("List size exceeds 6")
628592
629- cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6)
593+ bJ(bG(bG(bG(bG(bG(bG(bF, 0), 1), 2), 3), 4), 5), 6)
630594 }
631- if ((cG._3 > cL))
632- then throw(((("Insufficient payment! Attached=" + toString(cL)) + ", required=") + toString(cG._3)))
595+ if ((cn._3 > cs))
596+ then throw(((("Insufficient payment! Attached=" + toString(cs)) + ", required=") + toString(cn._3)))
633597 else {
634- let cH = makeString([cC[ay], makeString(cG._1, "_"), makeString(cG._2, "_"), cC[aB]], ":")
635- let cI = aO(invoke(z, "updateBackpack", [an, cH], nil))
636- let u = if (((cL - cG._3) > 0))
637- then [ScriptTransfer(cu.caller, (cL - cG._3), g)]
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)]
638602 else nil
639- let cP = (cG._3 / 100)
640- $Tuple2(((u ++ cG._4) :+ ScriptTransfer(y, cP, g)), cI)
603+ let cw = (cn._3 / 100)
604+ $Tuple2(((N ++ cn._4) :+ ScriptTransfer(R, cw, b)), cp)
641605 }
642606 }
643607 }
644608 }
645609 }
646610 else throw("Strict value is not equal to itself.")
647611 }
648612
649613
650614
651-@Callable(cu)
652-func craftGoods (cS,cT) = {
653- let cA = br()
654- if ((cA == cA))
655- then if ((size(cu.payments) != 1))
615+@Callable(cb)
616+func craftGoods (cz,cA) = {
617+ let ch = aX()
618+ if ((ch == ch))
619+ then if ((size(cb.payments) != 1))
656620 then throw("exactly 1 payment must be attached")
657621 else {
658- let cK = cu.payments[0]
659- let cL = cK.amount
660- let cM = valueOrErrorMessage(cK.assetId, "WAVES can't be used as payment")
661- if ((cM != g))
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))
662626 then throw("USDT payments only!")
663- else if ((cL != b))
627+ else if ((cs != f))
664628 then throw("exactly 1 USDT must be attached as payment")
665- else if ((0 >= cT))
629+ else if ((0 >= cA))
666630 then throw("Quantity should be positive")
667631 else {
668- let an = valueOrErrorMessage(getString(z, ak(toString(cu.caller))), "You don't have a duck staked")
669- let cB = split(valueOrElse(getString(z, ao(an)), A), "_")
670- if ((cB[aw] != "M"))
671- then throw(("Duck location type should be Manufactory, but is " + cB[aw]))
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]))
672636 else {
673- let cU = cB[av]
674- let cC = bp(am(an))
675- let cN = split(cC[aA], "_")
676- if (if ((0 > cS))
637+ let cB = ci[ao]
638+ let cj = aV(af(ag))
639+ let cu = split(cj[E], "_")
640+ if (if ((0 > cz))
677641 then true
678- else (cS >= size(Q)))
679- then throw(("Unknown product idx=" + toString(cS)))
642+ else (cz >= size(r)))
643+ then throw(("Unknown product idx=" + toString(cz)))
680644 else {
681- let cV = split(Q[cS], "_")
682- if ((size(cV) != (B + 3)))
683- then throw(("Fatal: unknown recipe: " + Q[cS]))
645+ let cC = split(r[cz], "_")
646+ if ((size(cC) != (k + 3)))
647+ then throw(("Fatal: unknown recipe: " + r[cz]))
684648 else {
685- let cW = parseIntValue(cV[ae])
686- if ((P[cW] != cU))
687- then throw(((("This product is available in " + P[cW]) + ", but you are in ") + cU))
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))
688652 else {
689- let cX = if ((cC[aB] == ""))
653+ let cE = if ((cj[F] == ""))
690654 then nil
691- else split(cC[aB], "_")
692- func cY (bt,cZ) = {
693- let da = bt._2
694- let db = if ((size(cX) > da))
695- then cX[da]
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]
696660 else "0"
697- let dc = parseIntValue(db)
698- let aV = (cT * parseIntValue(cV[ad]))
699- let dd = if ((da == cS))
700- then toString((dc + aV))
701- else db
702- $Tuple2((bt._1 :+ dd), (da + 1))
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))
703667 }
704668
705- let de = ( let bX = Q
706- let bY = size(bX)
707- let bZ = $Tuple2(nil, 0)
708- func ca (cb,cc) = if ((cc >= bY))
709- then cb
710- else cY(cb, bX[cc])
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])
711675
712- func cd (cb,cc) = if ((cc >= bY))
713- then cb
676+ func bJ (bH,bI) = if ((bI >= bE))
677+ then bH
714678 else throw("List size exceeds 50")
715679
716- cd(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(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))._1
717- func df (bt,bv) = {
718- let dg = ((parseIntValue(cV[bv]) * c) * cT)
719- let dh = parseIntValue(cN[bv])
720- if ((dg > dh))
721- then throw(((((((("You have " + cN[bv]) + " of ") + N[bv]) + ", but recipe requires ") + toString(dg)) + " for quantity ") + toString(cT)))
722- else if ((dg > 0))
723- then (bt :+ toString((dh - dg)))
724- else (bt :+ cN[bv])
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])
725689 }
726690
727- let cG = {
728- let bX = [0, 1, 2, 3, 4, 5]
729- let bY = size(bX)
730- let bZ = nil
731- func ce (cb,cc) = if ((cc >= bY))
732- then cb
733- else df(cb, bX[cc])
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])
734698
735- func cf (cb,cc) = if ((cc >= bY))
736- then cb
699+ func bL (bH,bI) = if ((bI >= bE))
700+ then bH
737701 else throw("List size exceeds 6")
738702
739- cf(ce(ce(ce(ce(ce(ce(bZ, 0), 1), 2), 3), 4), 5), 6)
703+ bL(bK(bK(bK(bK(bK(bK(bF, 0), 1), 2), 3), 4), 5), 6)
740704 }
741- let cH = makeString([cC[ay], cC[az], makeString(cG, "_"), makeString(de, "_")], ":")
742- let cI = aO(invoke(z, "updateBackpack", [an, cH], nil))
743- $Tuple2(nil, cI)
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)
744708 }
745709 }
746710 }
747711 }
748712 }
749713 }
750714 else throw("Strict value is not equal to itself.")
751715 }
752716
753717
754718
755-@Callable(cu)
756-func setWarehouseOrder (di,aj) = {
757- let dj = cu.originCaller
758- let au = toString(dj)
759- let cI = if ((dj != y))
760- then br()
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()
761725 else false
762- let dk = value(assetInfo(fromBase58String(aj)))
763- if (!(isDefined(getInteger(z, as(aj)))))
764- then throw((("NFT " + dk.name) + " is not staked"))
726+ let cR = value(assetInfo(fromBase58String(ac)))
727+ if (!(isDefined(getInteger(S, al(ac)))))
728+ then throw((("NFT " + cR.name) + " is not staked"))
765729 else {
766- let dl = valueOrErrorMessage(getString(z, aq(aj)), (("NFT " + dk.name) + " is orphaned"))
767- if (if ((dj != y))
768- then (dl != au)
730+ let cS = valueOrErrorMessage(getString(S, aj(ac)), (("NFT " + cR.name) + " is orphaned"))
731+ if (if ((cQ != R))
732+ then (cS != an)
769733 else false)
770- then throw((H + " is not yours"))
734+ then throw((j + " is not yours"))
771735 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)]
816767 }
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+ }
819777 }
820778 }
821779 }
822780
823781
824782
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"))
839799 else {
840- let dD = value(assetInfo(fromBase58String(aj)))
841- if (!(isDefined(getInteger(z, as(aj)))))
842- then throw((("NFT " + dD.name) + " is not staked"))
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")
843803 else {
844- let dE = valueOrErrorMessage(getString(z, aq(aj)), (("NFT " + dD.name) + " is orphaned"))
845- if ((dE == dA))
846- then throw("You cannot trade with yourself")
804+ let dm = split_4C(df, ":")
805+ if ((size(dm) != 3))
806+ then throw("bpOrderStr should contain exactly 2 ':' separators")
847807 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])
891847
892- func cd (cb,cc) = if ((cc >= bY))
893- then cb
894- else throw("List size exceeds 6")
848+ func bJ (bH,bI) = if ((bI >= bE))
849+ then bH
850+ else throw("List size exceeds 6")
895851
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+ }
897927 }
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+ }
985933 }
986934 }
987935 }
988- }
989- else throw("Strict value is not equal to itself.")
936+ }
990937 }
991938
992939

github/deemru/w8io/026f985 
507.89 ms