tx · 4gUdK8m5AW1i7V99LMhDzajkGG64k8UExbA9waGYMBBK

3N7d3jPxKqSi3XVnAgg8oFsHLcrgctFWpVw:  -0.01400000 Waves

2019.11.01 22:39 [746228] smart account 3N7d3jPxKqSi3XVnAgg8oFsHLcrgctFWpVw > SELF 0.00000000 Waves

{ "type": 13, "id": "4gUdK8m5AW1i7V99LMhDzajkGG64k8UExbA9waGYMBBK", "fee": 1400000, "feeAssetId": null, "timestamp": 1572637219642, "version": 1, "sender": "3N7d3jPxKqSi3XVnAgg8oFsHLcrgctFWpVw", "senderPublicKey": "GHnaLgezSnGCGe7LuhRy8j4JzCcySjwndqh6X9xHQNhz", "proofs": [ "4QnYEj4KKApPMKTD3PSyas8YD9PCK9GAacLLsYS5euqnzqm6N7RoqWYDQPqNXpiZK3JmMdFZH3RLKUgo3SmxtmKV" ], "script": "base64:AAIDAAAAAAAAAA8IARIECgIBARIDCgEIEgAAAAA6AQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAABAAAAGGdldFN0cmluZ0J5QWRkcmVzc0FuZEtleQAAAAIAAAAHYWRkcmVzcwAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWECAAAAAAEAAAAYZ2V0TnVtYmVyQ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bHQAAAACCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAAxPcmRlckJvb2tLZXkFAAAADG5ld09yZGVyYm9vawkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAFmdldE9yZGVyRmlsbGVkVG90YWxLZXkAAAABBQAAAAdvcmRlcklkCQAAZAAAAAIFAAAAC2ZpbGxlZFRvdGFsBQAAAAV0b3RhbAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAEWdldE9yZGVyU3RhdHVzS2V5AAAAAQUAAAAHb3JkZXJJZAUAAAAGc3RhdHVzCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAASZ2V0T3JkZXJIaXN0b3J5S2V5AAAAAQUAAAAGaGVpZ2h0BQAAAApvcmRlclByaWNlBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAApvcmRlck93bmVyBQAAAAxmaWxsZWRBbW91bnQFAAAAC2JvbmRBc3NldElkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAEG5ldXRyaW5vQ29udHJhY3QFAAAABXRvdGFsBQAAAA9uZXV0cmlub0Fzc2V0SWQFAAAAA25pbAAAAABkLao/", "chainId": 84, "height": 746228, "spentComplexity": 0 } View: original | compacted Prev: EKrJfYM3KNJPPPu5F4Lt9vZGZjbGXDcm8LzGvim2MJ69 Next: CNns7pQLLqUrW5yAop7oY5rvxAFWPA2YPRWqrUiWHdaR Diff:
OldNewDifferences
5959
6060 let o = 1000
6161
62-let p = "orderbook"
62+let p = 50
6363
64-let q = "order_price_"
64+let q = "orderbook"
6565
66-let r = "order_total_"
66+let r = "order_price_"
6767
68-let s = "order_filled_total_"
68+let s = "order_total_"
6969
70-let t = "order_owner_"
70+let t = "order_filled_total_"
7171
72-let u = "order_height_"
72+let u = "order_owner_"
7373
74-let v = "order_status_"
74+let v = "order_height_"
7575
76-let w = "price"
76+let w = "order_status_"
7777
78-let x = "bond_asset_id"
78+let x = "price"
7979
80-let y = "neutrino_asset_id"
80+let y = "bond_asset_id"
8181
82-let z = "neutrino_contract"
82+let z = "neutrino_asset_id"
8383
84-let A = "control_contract"
84+let A = "neutrino_contract"
8585
86-let B = "order_history_"
86+let B = "control_contract"
8787
88-let C = "swap_locked_balance"
88+let C = "order_history_"
8989
90-func D (E) = (q + E)
90+let D = "swap_locked_balance"
91+
92+let E = "swap_neutrino_locked_balance"
93+
94+func F (G) = (r + G)
9195
9296
93-func F (E) = (r + E)
97+func H (G) = (s + G)
9498
9599
96-func G (E) = (t + E)
100+func I (G) = (u + G)
97101
98102
99-func H (E) = (u + E)
103+func J (G) = (v + G)
100104
101105
102-func I (E) = (v + E)
106+func K (G) = (w + G)
103107
104108
105-func J (E) = (s + E)
109+func L (G) = (t + G)
106110
107111
108-func K (L) = (B + toString(L))
112+func M (N) = (C + toString(N))
109113
110114
111-let M = addressFromStringValue(e(z))
115+let O = addressFromStringValue(e(A))
112116
113-let N = addressFromStringValue(f(M, A))
117+let P = addressFromStringValue(f(O, B))
114118
115-let O = h(N, w)
119+let Q = h(P, x)
116120
117-func P (Q) = ((((Q * 100) / O) * i) / k)
121+func R (S) = ((((S * 100) / Q) * i) / k)
118122
119123
120-func R (Q) = ((((Q * O) / 100) * k) / i)
124+func T (S) = ((((S * Q) / 100) * k) / i)
121125
122126
123-func S (Q) = (Q / k)
127+func U (S) = (S / k)
124128
125129
126-func T (Q) = (Q * k)
130+func V (S) = (S * k)
127131
128132
129-func U (Q) = S(R(Q))
133+func W (S) = U(T(S))
130134
131135
132-let V = h(M, C)
136+let X = h(O, D)
133137
134-let W = fromBase58String(f(M, y))
138+let Y = h(O, E)
135139
136-let X = fromBase58String(f(M, x))
140+let Z = fromBase58String(f(O, z))
137141
138-let Y = e(p)
142+let aa = fromBase58String(f(O, y))
139143
140-let Z = (wavesBalance(this) - V)
144+let ab = e(q)
141145
142-let aa = {
143- let ab = extract(assetInfo(W))
144- (ab.quantity - assetBalance(M, W))
146+let ac = (wavesBalance(O) - X)
147+
148+let ad = {
149+ let ae = extract(assetInfo(Z))
150+ ((ae.quantity - assetBalance(this, Z)) + Y)
145151 }
146152
147-let ac = (aa - R(Z))
153+let af = (ad - T(ac))
148154
149-func ad (ae) = a(D(ae))
155+func ag (ah) = a(F(ah))
150156
151157
152-func af (ae) = a(F(ae))
158+func ai (ah) = a(H(ah))
153159
154160
155-func ag (ae) = e(G(ae))
161+func aj (ah) = e(I(ah))
156162
157163
158-func ah (ae) = e(I(ae))
164+func ak (ah) = e(K(ah))
159165
160166
161-func ai (ae) = a(J(ae))
167+func al (ah) = a(L(ah))
162168
163169
164-func aj (ae) = (ae + j)
170+func am (ah) = (ah + j)
165171
166172
167-func ak (E,al) = {
168- let am = split(Y, j)
169- let an = aj(E)
170- if ((al == 0))
171- then (an + Y)
172- else if ((al >= (size(am) - 1)))
173- then (Y + an)
173+func an (G,ao) = {
174+ let ap = split(ab, j)
175+ let aq = am(G)
176+ if ((ao == 0))
177+ then (aq + ab)
178+ else if ((ao >= (size(ap) - 1)))
179+ then (ab + aq)
174180 else {
175- let ao = split(Y, aj(am[al]))
176- (((ao[0] + an) + aj(am[al])) + ao[1])
181+ let ar = split(ab, am(ap[ao]))
182+ (((ar[0] + aq) + am(ap[ao])) + ar[1])
177183 }
178184 }
179185
180186
181-func ap (E) = {
182- let ao = split(Y, aj(E))
183- (ao[0] + ao[1])
187+func as (G) = {
188+ let ar = split(ab, am(G))
189+ (ar[0] + ar[1])
184190 }
185191
186192
187-@Callable(aq)
188-func setOrder (ar,al) = {
189- let as = extract(aq.payment)
190- let at = toBase58String(keccak256((((toBytes(ar) + toBytes(as.amount)) + aq.caller.bytes) + toBytes(height))))
191- if ((as.assetId != W))
192- then throw("can use neutrino only")
193- else if ((0 >= ar))
194- then throw("price less zero")
195- else if ((ag(at) != ""))
196- then throw("order exists")
197- else {
198- let am = split(Y, j)
199- let au = if ((al == 0))
200- then ""
201- else am[(al - 1)]
202- let av = ad(au)
203- let aw = if (if ((au != ""))
204- then (ar > av)
205- else false)
206- then true
207- else false
208- let ax = am[al]
209- let ay = ad(ax)
210- let az = if ((ay >= ar))
211- then true
212- else false
213- if (if (aw)
214- then true
215- else az)
216- then throw(((("invalid order isPrevOrderError:" + toString(az)) + " isNextOrderError:") + toString(aw)))
217- else WriteSet([DataEntry(p, ak(at, al)), DataEntry(D(at), ar), DataEntry(F(at), as.amount), DataEntry(G(at), toString(aq.caller)), DataEntry(H(at), height), DataEntry(I(at), m)])
218- }
193+@Callable(at)
194+func setOrder (au,ao) = {
195+ let av = extract(at.payment)
196+ let aw = toBase58String(keccak256((((toBytes(au) + toBytes(av.amount)) + at.caller.bytes) + toBytes(height))))
197+ if ((p > au))
198+ then throw("max discount is 50%")
199+ else if ((av.assetId != Z))
200+ then throw("can use neutrino only")
201+ else if ((0 >= au))
202+ then throw("price less zero")
203+ else if ((aj(aw) != ""))
204+ then throw("order exists")
205+ else {
206+ let ap = split(ab, j)
207+ let ax = if ((ao == 0))
208+ then ""
209+ else ap[(ao - 1)]
210+ let ay = ag(ax)
211+ let az = if (if ((ax != ""))
212+ then (au > ay)
213+ else false)
214+ then true
215+ else false
216+ let aA = ap[ao]
217+ let aB = ag(aA)
218+ let aC = if ((aB >= au))
219+ then true
220+ else false
221+ if (if (az)
222+ then true
223+ else aC)
224+ then throw(((("invalid order isPrevOrderError:" + toString(aC)) + " isNextOrderError:") + toString(az)))
225+ else WriteSet([DataEntry(q, an(aw, ao)), DataEntry(F(aw), au), DataEntry(H(aw), av.amount), DataEntry(I(aw), toString(at.caller)), DataEntry(J(aw), height), DataEntry(K(aw), m)])
226+ }
219227 }
220228
221229
222230
223-@Callable(aq)
224-func cancelOrder (E) = {
225- let aA = ag(E)
226- let Q = (af(E) - ai(E))
227- if ((aA != toString(aq.caller)))
231+@Callable(at)
232+func cancelOrder (G) = {
233+ let aD = aj(G)
234+ let S = (ai(G) - al(G))
235+ if ((aD != toString(at.caller)))
228236 then throw("permission denied")
229- else if ((ah(E) != m))
237+ else if ((ak(G) != m))
230238 then throw("invalid order status")
231- else ScriptResult(WriteSet([DataEntry(p, ap(E)), DataEntry(I(E), l)]), TransferSet([ScriptTransfer(aq.caller, Q, W)]))
239+ else ScriptResult(WriteSet([DataEntry(q, as(G)), DataEntry(K(G), l)]), TransferSet([ScriptTransfer(at.caller, S, Z)]))
232240 }
233241
234242
235243
236-@Callable(aq)
244+@Callable(at)
237245 func executeOrder () = {
238- let aB = assetBalance(this, X)
239- let aC = if ((0 >= ac))
246+ let aE = assetBalance(this, aa)
247+ let aF = if ((0 >= af))
240248 then 0
241- else ac
242- let aD = if ((aC >= aB))
243- then aB
244- else aC
245- let aE = if ((aC >= aB))
249+ else af
250+ let aG = if ((aF >= aE))
251+ then aE
252+ else aF
253+ let aH = if ((aF >= aE))
246254 then 0
247- else (aB - aC)
248- if (if ((aE == 0))
249- then (aD == 0)
255+ else (aE - aF)
256+ if (if ((aH == 0))
257+ then (aG == 0)
250258 else false)
251259 then throw("without deficit")
252- else if ((aD == 0))
253- then TransferSet([ScriptTransfer(M, aE, X)])
260+ else if ((aG == 0))
261+ then TransferSet([ScriptTransfer(O, aH, aa)])
254262 else {
255- let E = split(Y, j)[0]
256- let aF = ai(E)
257- let aG = af(E)
258- let aH = ad(E)
259- let aI = ag(E)
260- let Q = S((((aG - aF) * 100) / aH))
261- let aJ = if ((aD >= Q))
262- then ap(E)
263- else Y
264- let aK = if ((aD >= Q))
265- then Q
266- else aD
267- let aL = (((aK * aH) * k) / 100)
268- let aM = if ((aD >= Q))
263+ let G = split(ab, j)[0]
264+ let aI = al(G)
265+ let aJ = ai(G)
266+ let aK = ag(G)
267+ let aL = aj(G)
268+ let S = U((((aJ - aI) * 100) / aK))
269+ let aM = if ((aG >= S))
270+ then as(G)
271+ else ab
272+ let aN = if ((aG >= S))
273+ then S
274+ else aG
275+ let aO = (((aN * aK) * k) / 100)
276+ let aP = if ((aG >= S))
269277 then n
270278 else m
271- if ((aL == 0))
279+ if ((aO == 0))
272280 then throw("total equal zero")
273- else ScriptResult(WriteSet([DataEntry(p, aJ), DataEntry(J(E), (aF + aL)), DataEntry(I(E), aM), DataEntry(K(height), aH)]), TransferSet([ScriptTransfer(addressFromStringValue(aI), aK, X), ScriptTransfer(M, aL, W)]))
281+ else ScriptResult(WriteSet([DataEntry(q, aM), DataEntry(L(G), (aI + aO)), DataEntry(K(G), aP), DataEntry(M(height), aK)]), TransferSet([ScriptTransfer(addressFromStringValue(aL), aN, aa), ScriptTransfer(O, aO, Z)]))
274282 }
275283 }
276284
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func a (b) = {
55 let c = getInteger(this, b)
66 if ($isInstanceOf(c, "Int"))
77 then {
88 let d = c
99 d
1010 }
1111 else 0
1212 }
1313
1414
1515 func e (b) = {
1616 let c = getString(this, b)
1717 if ($isInstanceOf(c, "String"))
1818 then {
1919 let d = c
2020 d
2121 }
2222 else ""
2323 }
2424
2525
2626 func f (g,b) = {
2727 let c = getString(g, b)
2828 if ($isInstanceOf(c, "String"))
2929 then {
3030 let d = c
3131 d
3232 }
3333 else ""
3434 }
3535
3636
3737 func h (g,b) = {
3838 let c = getInteger(g, b)
3939 if ($isInstanceOf(c, "Int"))
4040 then {
4141 let d = c
4242 d
4343 }
4444 else 0
4545 }
4646
4747
4848 let i = 100000000
4949
5050 let j = "_"
5151
5252 let k = 100
5353
5454 let l = "canceled"
5555
5656 let m = "new"
5757
5858 let n = "filled"
5959
6060 let o = 1000
6161
62-let p = "orderbook"
62+let p = 50
6363
64-let q = "order_price_"
64+let q = "orderbook"
6565
66-let r = "order_total_"
66+let r = "order_price_"
6767
68-let s = "order_filled_total_"
68+let s = "order_total_"
6969
70-let t = "order_owner_"
70+let t = "order_filled_total_"
7171
72-let u = "order_height_"
72+let u = "order_owner_"
7373
74-let v = "order_status_"
74+let v = "order_height_"
7575
76-let w = "price"
76+let w = "order_status_"
7777
78-let x = "bond_asset_id"
78+let x = "price"
7979
80-let y = "neutrino_asset_id"
80+let y = "bond_asset_id"
8181
82-let z = "neutrino_contract"
82+let z = "neutrino_asset_id"
8383
84-let A = "control_contract"
84+let A = "neutrino_contract"
8585
86-let B = "order_history_"
86+let B = "control_contract"
8787
88-let C = "swap_locked_balance"
88+let C = "order_history_"
8989
90-func D (E) = (q + E)
90+let D = "swap_locked_balance"
91+
92+let E = "swap_neutrino_locked_balance"
93+
94+func F (G) = (r + G)
9195
9296
93-func F (E) = (r + E)
97+func H (G) = (s + G)
9498
9599
96-func G (E) = (t + E)
100+func I (G) = (u + G)
97101
98102
99-func H (E) = (u + E)
103+func J (G) = (v + G)
100104
101105
102-func I (E) = (v + E)
106+func K (G) = (w + G)
103107
104108
105-func J (E) = (s + E)
109+func L (G) = (t + G)
106110
107111
108-func K (L) = (B + toString(L))
112+func M (N) = (C + toString(N))
109113
110114
111-let M = addressFromStringValue(e(z))
115+let O = addressFromStringValue(e(A))
112116
113-let N = addressFromStringValue(f(M, A))
117+let P = addressFromStringValue(f(O, B))
114118
115-let O = h(N, w)
119+let Q = h(P, x)
116120
117-func P (Q) = ((((Q * 100) / O) * i) / k)
121+func R (S) = ((((S * 100) / Q) * i) / k)
118122
119123
120-func R (Q) = ((((Q * O) / 100) * k) / i)
124+func T (S) = ((((S * Q) / 100) * k) / i)
121125
122126
123-func S (Q) = (Q / k)
127+func U (S) = (S / k)
124128
125129
126-func T (Q) = (Q * k)
130+func V (S) = (S * k)
127131
128132
129-func U (Q) = S(R(Q))
133+func W (S) = U(T(S))
130134
131135
132-let V = h(M, C)
136+let X = h(O, D)
133137
134-let W = fromBase58String(f(M, y))
138+let Y = h(O, E)
135139
136-let X = fromBase58String(f(M, x))
140+let Z = fromBase58String(f(O, z))
137141
138-let Y = e(p)
142+let aa = fromBase58String(f(O, y))
139143
140-let Z = (wavesBalance(this) - V)
144+let ab = e(q)
141145
142-let aa = {
143- let ab = extract(assetInfo(W))
144- (ab.quantity - assetBalance(M, W))
146+let ac = (wavesBalance(O) - X)
147+
148+let ad = {
149+ let ae = extract(assetInfo(Z))
150+ ((ae.quantity - assetBalance(this, Z)) + Y)
145151 }
146152
147-let ac = (aa - R(Z))
153+let af = (ad - T(ac))
148154
149-func ad (ae) = a(D(ae))
155+func ag (ah) = a(F(ah))
150156
151157
152-func af (ae) = a(F(ae))
158+func ai (ah) = a(H(ah))
153159
154160
155-func ag (ae) = e(G(ae))
161+func aj (ah) = e(I(ah))
156162
157163
158-func ah (ae) = e(I(ae))
164+func ak (ah) = e(K(ah))
159165
160166
161-func ai (ae) = a(J(ae))
167+func al (ah) = a(L(ah))
162168
163169
164-func aj (ae) = (ae + j)
170+func am (ah) = (ah + j)
165171
166172
167-func ak (E,al) = {
168- let am = split(Y, j)
169- let an = aj(E)
170- if ((al == 0))
171- then (an + Y)
172- else if ((al >= (size(am) - 1)))
173- then (Y + an)
173+func an (G,ao) = {
174+ let ap = split(ab, j)
175+ let aq = am(G)
176+ if ((ao == 0))
177+ then (aq + ab)
178+ else if ((ao >= (size(ap) - 1)))
179+ then (ab + aq)
174180 else {
175- let ao = split(Y, aj(am[al]))
176- (((ao[0] + an) + aj(am[al])) + ao[1])
181+ let ar = split(ab, am(ap[ao]))
182+ (((ar[0] + aq) + am(ap[ao])) + ar[1])
177183 }
178184 }
179185
180186
181-func ap (E) = {
182- let ao = split(Y, aj(E))
183- (ao[0] + ao[1])
187+func as (G) = {
188+ let ar = split(ab, am(G))
189+ (ar[0] + ar[1])
184190 }
185191
186192
187-@Callable(aq)
188-func setOrder (ar,al) = {
189- let as = extract(aq.payment)
190- let at = toBase58String(keccak256((((toBytes(ar) + toBytes(as.amount)) + aq.caller.bytes) + toBytes(height))))
191- if ((as.assetId != W))
192- then throw("can use neutrino only")
193- else if ((0 >= ar))
194- then throw("price less zero")
195- else if ((ag(at) != ""))
196- then throw("order exists")
197- else {
198- let am = split(Y, j)
199- let au = if ((al == 0))
200- then ""
201- else am[(al - 1)]
202- let av = ad(au)
203- let aw = if (if ((au != ""))
204- then (ar > av)
205- else false)
206- then true
207- else false
208- let ax = am[al]
209- let ay = ad(ax)
210- let az = if ((ay >= ar))
211- then true
212- else false
213- if (if (aw)
214- then true
215- else az)
216- then throw(((("invalid order isPrevOrderError:" + toString(az)) + " isNextOrderError:") + toString(aw)))
217- else WriteSet([DataEntry(p, ak(at, al)), DataEntry(D(at), ar), DataEntry(F(at), as.amount), DataEntry(G(at), toString(aq.caller)), DataEntry(H(at), height), DataEntry(I(at), m)])
218- }
193+@Callable(at)
194+func setOrder (au,ao) = {
195+ let av = extract(at.payment)
196+ let aw = toBase58String(keccak256((((toBytes(au) + toBytes(av.amount)) + at.caller.bytes) + toBytes(height))))
197+ if ((p > au))
198+ then throw("max discount is 50%")
199+ else if ((av.assetId != Z))
200+ then throw("can use neutrino only")
201+ else if ((0 >= au))
202+ then throw("price less zero")
203+ else if ((aj(aw) != ""))
204+ then throw("order exists")
205+ else {
206+ let ap = split(ab, j)
207+ let ax = if ((ao == 0))
208+ then ""
209+ else ap[(ao - 1)]
210+ let ay = ag(ax)
211+ let az = if (if ((ax != ""))
212+ then (au > ay)
213+ else false)
214+ then true
215+ else false
216+ let aA = ap[ao]
217+ let aB = ag(aA)
218+ let aC = if ((aB >= au))
219+ then true
220+ else false
221+ if (if (az)
222+ then true
223+ else aC)
224+ then throw(((("invalid order isPrevOrderError:" + toString(aC)) + " isNextOrderError:") + toString(az)))
225+ else WriteSet([DataEntry(q, an(aw, ao)), DataEntry(F(aw), au), DataEntry(H(aw), av.amount), DataEntry(I(aw), toString(at.caller)), DataEntry(J(aw), height), DataEntry(K(aw), m)])
226+ }
219227 }
220228
221229
222230
223-@Callable(aq)
224-func cancelOrder (E) = {
225- let aA = ag(E)
226- let Q = (af(E) - ai(E))
227- if ((aA != toString(aq.caller)))
231+@Callable(at)
232+func cancelOrder (G) = {
233+ let aD = aj(G)
234+ let S = (ai(G) - al(G))
235+ if ((aD != toString(at.caller)))
228236 then throw("permission denied")
229- else if ((ah(E) != m))
237+ else if ((ak(G) != m))
230238 then throw("invalid order status")
231- else ScriptResult(WriteSet([DataEntry(p, ap(E)), DataEntry(I(E), l)]), TransferSet([ScriptTransfer(aq.caller, Q, W)]))
239+ else ScriptResult(WriteSet([DataEntry(q, as(G)), DataEntry(K(G), l)]), TransferSet([ScriptTransfer(at.caller, S, Z)]))
232240 }
233241
234242
235243
236-@Callable(aq)
244+@Callable(at)
237245 func executeOrder () = {
238- let aB = assetBalance(this, X)
239- let aC = if ((0 >= ac))
246+ let aE = assetBalance(this, aa)
247+ let aF = if ((0 >= af))
240248 then 0
241- else ac
242- let aD = if ((aC >= aB))
243- then aB
244- else aC
245- let aE = if ((aC >= aB))
249+ else af
250+ let aG = if ((aF >= aE))
251+ then aE
252+ else aF
253+ let aH = if ((aF >= aE))
246254 then 0
247- else (aB - aC)
248- if (if ((aE == 0))
249- then (aD == 0)
255+ else (aE - aF)
256+ if (if ((aH == 0))
257+ then (aG == 0)
250258 else false)
251259 then throw("without deficit")
252- else if ((aD == 0))
253- then TransferSet([ScriptTransfer(M, aE, X)])
260+ else if ((aG == 0))
261+ then TransferSet([ScriptTransfer(O, aH, aa)])
254262 else {
255- let E = split(Y, j)[0]
256- let aF = ai(E)
257- let aG = af(E)
258- let aH = ad(E)
259- let aI = ag(E)
260- let Q = S((((aG - aF) * 100) / aH))
261- let aJ = if ((aD >= Q))
262- then ap(E)
263- else Y
264- let aK = if ((aD >= Q))
265- then Q
266- else aD
267- let aL = (((aK * aH) * k) / 100)
268- let aM = if ((aD >= Q))
263+ let G = split(ab, j)[0]
264+ let aI = al(G)
265+ let aJ = ai(G)
266+ let aK = ag(G)
267+ let aL = aj(G)
268+ let S = U((((aJ - aI) * 100) / aK))
269+ let aM = if ((aG >= S))
270+ then as(G)
271+ else ab
272+ let aN = if ((aG >= S))
273+ then S
274+ else aG
275+ let aO = (((aN * aK) * k) / 100)
276+ let aP = if ((aG >= S))
269277 then n
270278 else m
271- if ((aL == 0))
279+ if ((aO == 0))
272280 then throw("total equal zero")
273- else ScriptResult(WriteSet([DataEntry(p, aJ), DataEntry(J(E), (aF + aL)), DataEntry(I(E), aM), DataEntry(K(height), aH)]), TransferSet([ScriptTransfer(addressFromStringValue(aI), aK, X), ScriptTransfer(M, aL, W)]))
281+ else ScriptResult(WriteSet([DataEntry(q, aM), DataEntry(L(G), (aI + aO)), DataEntry(K(G), aP), DataEntry(M(height), aK)]), TransferSet([ScriptTransfer(addressFromStringValue(aL), aN, aa), ScriptTransfer(O, aO, Z)]))
274282 }
275283 }
276284
277285

github/deemru/w8io/169f3d6 
84.28 ms