tx · GhN8QV1Z67tpAc8Ng12Di2WdpUhPLRf5mMCMLNBhioLq

3Mu7bwtYrymjrXt1ttcqaQbFc1PqGhZndhv:  -0.01400000 Waves

2019.10.01 17:50 [700785] smart account 3Mu7bwtYrymjrXt1ttcqaQbFc1PqGhZndhv > SELF 0.00000000 Waves

{ "type": 13, "id": "GhN8QV1Z67tpAc8Ng12Di2WdpUhPLRf5mMCMLNBhioLq", "fee": 1400000, "feeAssetId": null, "timestamp": 1569941416921, "version": 1, "sender": "3Mu7bwtYrymjrXt1ttcqaQbFc1PqGhZndhv", "senderPublicKey": "BxHnTcjvN9ZtnKfdKYp6aKRdkMB4ZHxHnTDr5dWx5Vz2", "proofs": [ "2Zpa4p5NBs94RxELdvM6fQVH4NS7xzMYx5EJv1mQsECmUyhUVucvMZp8ke5yMyZsicmDoDLCMbjFqNujojvDfvWy" ], "script": "base64:AAIDAAAAAAAAAAAAAAADAAAAAAh1VG9rZW5JZAEAAAAgg1ag/CIT1AiojH1skJ2ufidI0Eb3a9g5aB0rTX7UN7gBAAAAC2NoZWNrU3RhdHVzAAAAAQAAAAdhZGRyZXNzBAAAAA9zdGF0dXNVbmxpbWl0ZWQEAAAAByRtYXRjaDAJAAQbAAAAAgUAAAAEdGhpcwkAASwAAAACBQAAAAdhZGRyZXNzAgAAAApfdW5saW1pdGVkAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAdCb29sZWFuBAAAAARib29sBQAAAAckbWF0Y2gwBQAAAARib29sAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAARVbml0BwkBAAAABXRocm93AAAAAAQAAAAKc3RhdHVzVGltZQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzCQABLAAAAAIFAAAAB2FkZHJlc3MCAAAABV90aW1lAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAA2ludAUAAAAHJG1hdGNoMAUAAAADaW50AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAARVbml0AAAA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lEYXRhRW50cnkAAAACAgAAAAZvcmRlcnMFAAAACW5ld09yZGVycwkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAHb3JkZXJJZAUAAAAHbmV3RGF0YQUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAMcmV0dXJuQW1vdW50AwkAAAAAAAACBQAAAA9vcmRlclByaWNlQXNzZXQCAAAABVdBVkVTBQAAAAR1bml0CQACWQAAAAEFAAAAD29yZGVyUHJpY2VBc3NldAUAAAADbmlsAAAAALnx/8c=", "chainId": 84, "height": 700785, "spentComplexity": 0 } View: original | compacted Prev: Do9boHeu51KxmWGzdqvKSVHdSNrJ6c1EKyFaKrHexBmN Next: none Diff:
OldNewDifferences
3232 }
3333
3434
35-@Callable(i)
36-func addAsset (j) = {
37- let k = (100 * 100000000)
38- let l = "100"
39- let m = valueOrErrorMessage(i.payment, "Where is payment?")
40- if (if (isDefined(m.assetId))
41- then (m.assetId != a)
35+func i (j,k) = {
36+ let l = if ((j == "WAVES"))
37+ then 8
38+ else value(assetInfo(fromBase58String(j))).decimals
39+ let m = if ((k == "WAVES"))
40+ then 8
41+ else value(assetInfo(fromBase58String(k))).decimals
42+ (m >= l)
43+ }
44+
45+
46+@Callable(n)
47+func addAsset (o) = {
48+ let p = (100 * 100000000)
49+ let q = "100"
50+ let r = valueOrErrorMessage(n.payment, "Where is payment?")
51+ if (if (isDefined(r.assetId))
52+ then (r.assetId != a)
4253 else false)
4354 then throw("OTCu or WAVES only")
44- else if ((m.amount != k))
45- then throw((("You have to pay " + l) + " OTCu or WAVES"))
46- else if (!(isDefined(assetInfo(fromBase58String(j)))))
55+ else if ((r.amount != p))
56+ then throw((("You have to pay " + q) + " OTCu or WAVES"))
57+ else if (!(isDefined(assetInfo(fromBase58String(o)))))
4758 then throw("There is no asset with specified id")
4859 else {
49- let n = {
60+ let s = {
5061 let e = getString(this, "assets")
5162 if ($isInstanceOf(e, "String"))
5263 then {
53- let o = e
54- o
64+ let t = e
65+ t
5566 }
5667 else if ($isInstanceOf(e, "Unit"))
5768 then ""
5869 else throw()
5970 }
60- if (isDefined(indexOf(n, j)))
71+ if (isDefined(indexOf(s, o)))
6172 then throw("Asset is already available")
62- else WriteSet([DataEntry("assets", (n + j))])
73+ else WriteSet([DataEntry("assets", (s + o))])
6374 }
6475 }
6576
6677
6778
68-@Callable(i)
69-func pro (p) = {
70- let c = toBase58String(i.caller.bytes)
71- let q = (50 * 100000000)
72- let r = "50"
73- let s = (10 * 100000000)
74- let t = "10"
75- let m = valueOrErrorMessage(i.payment, "Where is payment?")
76- if (if (isDefined(m.assetId))
77- then (m.assetId != a)
79+@Callable(n)
80+func pro (u) = {
81+ let c = toBase58String(n.caller.bytes)
82+ let v = (50 * 100000000)
83+ let w = "50"
84+ let x = (10 * 100000000)
85+ let y = "10"
86+ let r = valueOrErrorMessage(n.payment, "Where is payment?")
87+ if (if (isDefined(r.assetId))
88+ then (r.assetId != a)
7889 else false)
7990 then throw("OTCu or WAVES only")
80- else if (if (p)
81- then (m.amount != q)
91+ else if (if (u)
92+ then (r.amount != v)
8293 else false)
83- then throw((("You have to pay " + r) + " OTCu or WAVES"))
84- else if (if (!(p))
85- then (m.amount != s)
94+ then throw((("You have to pay " + w) + " OTCu or WAVES"))
95+ else if (if (!(u))
96+ then (r.amount != x)
8697 else false)
87- then throw((("You have to pay " + t) + " OTCu or WAVES"))
98+ then throw((("You have to pay " + y) + " OTCu or WAVES"))
8899 else {
89- let u = {
100+ let z = {
90101 let e = getBoolean(this, (c + "_unlimited"))
91102 if ($isInstanceOf(e, "Boolean"))
92103 then {
97108 then false
98109 else throw()
99110 }
100- let v = {
111+ let A = {
101112 let e = getInteger(this, (c + "_time"))
102113 if ($isInstanceOf(e, "Int"))
103114 then {
108119 then 0
109120 else throw()
110121 }
111- if (u)
122+ if (z)
112123 then throw("You have unlimited PRO status already. What do you want?")
113124 else {
114- let w = 2629743000
115- WriteSet([DataEntry((c + "_unlimited"), p), DataEntry((c + "_time"), if (p)
125+ let B = 2629743000
126+ WriteSet([DataEntry((c + "_unlimited"), u), DataEntry((c + "_time"), if (u)
116127 then 0
117- else (v + w))])
128+ else (A + B))])
118129 }
119130 }
120131 }
121132
122133
123134
124-@Callable(i)
125-func makeSell (x,y,z,A) = if (if ((x != "WAVES"))
126- then !(isDefined(assetInfo(fromBase58String(x))))
135+@Callable(n)
136+func makeSell (k,C,D,E) = if (if ((k != "WAVES"))
137+ then !(isDefined(assetInfo(fromBase58String(k))))
127138 else false)
128139 then throw("There is no asset with specified id")
129- else if ((0 >= y))
130- then throw("price must be positive")
140+ else if ((0 >= C))
141+ then throw("Amount of price asset must be positive")
131142 else {
132- let m = valueOrErrorMessage(i.payment, "where is payment?")
133- if ((0 >= m.amount))
134- then throw("amount must be positive")
143+ let r = valueOrErrorMessage(n.payment, "Where is payment?")
144+ if ((0 >= r.amount))
145+ then throw("Amount must be positive")
135146 else {
136- let B = {
137- let e = m.assetId
147+ let j = {
148+ let e = r.assetId
138149 if ($isInstanceOf(e, "ByteVector"))
139150 then {
140- let C = e
141- toBase58String(C)
151+ let F = e
152+ toBase58String(F)
142153 }
143154 else "WAVES"
144155 }
145- let n = valueOrErrorMessage(getString(this, "assets"), "There are not available assets")
146- if (if (!(isDefined(indexOf(n, x))))
156+ let s = valueOrErrorMessage(getString(this, "assets"), "There are not available assets")
157+ if (if (!(isDefined(indexOf(s, k))))
147158 then true
148- else !(isDefined(indexOf(n, B))))
159+ else !(isDefined(indexOf(s, j))))
149160 then throw("Asset are not available for trading")
150161 else {
151- let c = toBase58String(i.caller.bytes)
162+ let c = toBase58String(n.caller.bytes)
152163 if (if (!(b(c)))
153- then if (z)
164+ then if (D)
154165 then true
155- else (A != "")
166+ else (E != "")
156167 else false)
157168 then throw("You must have pro status to use these features")
158169 else {
159- let D = toBase58String(i.transactionId)
160- let E = {
170+ let G = toBase58String(n.transactionId)
171+ let H = {
161172 let e = getString(this, "orders")
162173 if ($isInstanceOf(e, "String"))
163174 then {
164- let F = e
165- F
175+ let I = e
176+ I
166177 }
167178 else if ($isInstanceOf(e, "Unit"))
168179 then ""
169180 else throw()
170181 }
171- let G = fromBase58String(A)
172- let H = ((((((((((((((toString(m.amount) + "_") + B) + "_") + toString(y)) + "_") + x) + "_") + c) + "_") + toString(z)) + "_") + A) + "_") + toString(0))
173- WriteSet([DataEntry("orders", (E + D)), DataEntry(D, H)])
182+ let J = fromBase58String(E)
183+ let K = (((((((((((((((("sell" + "_") + toString(r.amount)) + "_") + j) + "_") + toString(C)) + "_") + k) + "_") + c) + "_") + toString(D)) + "_") + E) + "_") + toString(0))
184+ WriteSet([DataEntry("orders", (H + G)), DataEntry(G, K)])
174185 }
175186 }
176187 }
178189
179190
180191
181-@Callable(i)
182-func makeBuy (B,y,z,A) = if (if ((B != "WAVES"))
183- then !(isDefined(assetInfo(fromBase58String(B))))
192+@Callable(n)
193+func makeBuy (j,L,D,E) = if (if ((j != "WAVES"))
194+ then !(isDefined(assetInfo(fromBase58String(j))))
184195 else false)
185196 then throw("There is no asset with specified id")
186- else if ((0 >= y))
187- then throw("price must be positive")
197+ else if ((0 >= L))
198+ then throw("Amount must be positive")
188199 else {
189- let m = valueOrErrorMessage(i.payment, "where is payment?")
190- if ((0 >= m.amount))
200+ let r = valueOrErrorMessage(n.payment, "where is payment?")
201+ let C = r.amount
202+ if ((0 >= C))
191203 then throw("amount must be positive")
192204 else {
193- let x = {
194- let e = m.assetId
205+ let k = {
206+ let e = r.assetId
195207 if ($isInstanceOf(e, "ByteVector"))
196208 then {
197- let C = e
198- toBase58String(C)
209+ let F = e
210+ toBase58String(F)
199211 }
200212 else "WAVES"
201213 }
202- let n = valueOrErrorMessage(getString(this, "assets"), "There are not available assets")
203- if (if (!(isDefined(indexOf(n, x))))
214+ let s = valueOrErrorMessage(getString(this, "assets"), "There are not available assets")
215+ if (if (!(isDefined(indexOf(s, k))))
204216 then true
205- else !(isDefined(indexOf(n, B))))
217+ else !(isDefined(indexOf(s, j))))
206218 then throw("Asset are not available for trading")
207219 else {
208- let c = toBase58String(i.caller.bytes)
220+ let c = toBase58String(n.caller.bytes)
209221 if (if (!(b(c)))
210- then if (z)
222+ then if (D)
211223 then true
212- else (A != "")
224+ else (E != "")
213225 else false)
214226 then throw("You must have pro status to use these features")
215227 else {
216- let D = toBase58String(i.transactionId)
217- let E = {
228+ let G = toBase58String(n.transactionId)
229+ let H = {
218230 let e = getString(this, "orders")
219231 if ($isInstanceOf(e, "String"))
220232 then {
221- let F = e
222- F
233+ let I = e
234+ I
223235 }
224236 else if ($isInstanceOf(e, "Unit"))
225237 then ""
226238 else throw()
227239 }
228- let I = if ((B == "WAVES"))
229- then 8
230- else value(assetInfo(fromBase58String(B))).decimals
231- let J = ((m.amount * pow(10, 0, I, 0, 0, CEILING)) / y)
232- if ((J == 0))
240+ if ((L == 0))
233241 then throw("invalid buy amount")
234242 else {
235- let H = ((((((((((((((toString(J) + "_") + B) + "_") + toString(y)) + "_") + x) + "_") + c) + "_") + toString(z)) + "_") + A) + "_") + toString(0))
236- WriteSet([DataEntry("orders", (E + D)), DataEntry(D, H)])
243+ let K = (((((((((((((((("buy" + "_") + toString(L)) + "_") + j) + "_") + toString(C)) + "_") + k) + "_") + c) + "_") + toString(D)) + "_") + E) + "_") + toString(0))
244+ WriteSet([DataEntry("orders", (H + G)), DataEntry(("buy_" + G), K)])
237245 }
238246 }
239247 }
242250
243251
244252
245-@Callable(i)
246-func takeSell (D,K) = {
247- let m = valueOrErrorMessage(i.payment, "where is payment?")
248- if ((0 >= m.amount))
249- then throw("amount must be positive")
253+@Callable(n)
254+func takeSell (G,M) = {
255+ let r = valueOrErrorMessage(n.payment, "Where is payment?")
256+ let C = r.amount
257+ if ((0 >= C))
258+ then throw("Amount must be positive")
250259 else {
251- let L = {
252- let e = m.assetId
260+ let k = {
261+ let e = r.assetId
253262 if ($isInstanceOf(e, "ByteVector"))
254263 then {
255- let C = e
256- toBase58String(C)
264+ let F = e
265+ toBase58String(F)
257266 }
258267 else "WAVES"
259268 }
260- let H = valueOrErrorMessage(getString(this, D), "Invalid order id")
261- let M = parseIntValue(split(H, "_")[0])
262- let B = split(H, "_")[1]
263- let y = parseIntValue(split(H, "_")[2])
264- let x = split(H, "_")[3]
265- let N = value(addressFromString(split(H, "_")[4]))
266- let z = if ((split(H, "_")[5] == "true"))
269+ let K = valueOrErrorMessage(getString(this, G), "Invalid order id")
270+ let N = split(K, "_")[0]
271+ let O = parseIntValue(split(K, "_")[1])
272+ let P = split(K, "_")[2]
273+ let Q = parseIntValue(split(K, "_")[3])
274+ let R = split(K, "_")[4]
275+ let S = value(addressFromString(split(K, "_")[5]))
276+ let T = if ((split(K, "_")[6] == "true"))
267277 then true
268278 else false
269- let A = split(H, "_")[6]
270- let O = parseIntValue(split(H, "_")[7])
271- if ((x != L))
272- then throw(("Payment asset must be " + x))
273- else {
274- let P = if ((A != ""))
275- then sigVerify(i.callerPublicKey, fromBase58String(K), fromBase58String(A))
276- else true
277- if (!(P))
278- then throw("The order is private")
279- else {
280- let I = if ((B == "WAVES"))
281- then 8
282- else value(assetInfo(fromBase58String(B))).decimals
283- let J = ((m.amount * pow(10, 0, I, 0, 0, CEILING)) / y)
284- if ((J == 0))
285- then throw("Invalid amount")
286- else if (if (z)
287- then (M > J)
288- else false)
289- then throw("You must take all or none")
290- else if ((J > (M - O)))
291- then throw("Not enougth asset in order")
292- else {
293- let E = {
294- let e = getString(this, "orders")
295- if ($isInstanceOf(e, "String"))
296- then {
297- let F = e
298- F
299- }
300- else if ($isInstanceOf(e, "Unit"))
301- then ""
302- else throw()
279+ let U = split(K, "_")[7]
280+ let V = parseIntValue(split(K, "_")[8])
281+ if ((N != "sell"))
282+ then throw("Invalid order type")
283+ else if ((R != k))
284+ then throw(("Payment asset must be " + R))
285+ else {
286+ let W = if ((U != ""))
287+ then sigVerify(n.callerPublicKey, fromBase58String(M), fromBase58String(U))
288+ else true
289+ if (!(W))
290+ then throw("The order is private")
291+ else {
292+ let L = ((C * O) / Q)
293+ if ((L == 0))
294+ then throw("Invalid amount")
295+ else if (if (T)
296+ then (O > L)
297+ else false)
298+ then throw("You must take all or none")
299+ else if ((L > (O - V)))
300+ then throw("Not enougth asset in order")
301+ else {
302+ let H = {
303+ let e = getString(this, "orders")
304+ if ($isInstanceOf(e, "String"))
305+ then {
306+ let I = e
307+ I
308+ }
309+ else if ($isInstanceOf(e, "Unit"))
310+ then ""
311+ else throw()
312+ }
313+ let X = (dropRight(K, size(split(K, "_")[7])) + toString((V + L)))
314+ let Y = value(indexOf(H, G))
315+ let Z = if ((O == (L + V)))
316+ then (take(H, Y) + drop(H, (Y + size(G))))
317+ else H
318+ ScriptResult(WriteSet([DataEntry("orders", Z), DataEntry(G, X)]), TransferSet([ScriptTransfer(n.caller, L, if ((P == "WAVES"))
319+ then unit
320+ else fromBase58String(P)), ScriptTransfer(S, C, if ((R == "WAVES"))
321+ then unit
322+ else fromBase58String(R))]))
303323 }
304- let Q = (dropRight(H, size(split(H, "_")[7])) + toString((O + J)))
305- let R = value(indexOf(E, D))
306- let S = if ((M == (J + O)))
307- then (take(E, R) + drop(E, (R + size(D))))
308- else E
309- ScriptResult(WriteSet([DataEntry("orders", S), DataEntry(D, Q)]), TransferSet([ScriptTransfer(i.caller, J, if ((B == "WAVES"))
310- then unit
311- else fromBase58String(B)), ScriptTransfer(N, m.amount, if ((x == "WAVES"))
312- then unit
313- else fromBase58String(x))]))
314- }
315- }
316- }
324+ }
325+ }
317326 }
318327 }
319328
320329
321330
322-@Callable(i)
323-func takeBuy (D,K) = {
324- let m = valueOrErrorMessage(i.payment, "where is payment?")
325- if ((0 >= m.amount))
331+@Callable(n)
332+func takeBuy (G,M) = {
333+ let r = valueOrErrorMessage(n.payment, "where is payment?")
334+ let L = r.amount
335+ if ((0 >= L))
326336 then throw("amount must be positive")
327337 else {
328- let L = {
329- let e = m.assetId
338+ let j = {
339+ let e = r.assetId
330340 if ($isInstanceOf(e, "ByteVector"))
331341 then {
332- let C = e
333- toBase58String(C)
342+ let F = e
343+ toBase58String(F)
334344 }
335345 else "WAVES"
336346 }
337- let H = valueOrErrorMessage(getString(this, D), "Invalid order id")
338- let M = parseIntValue(split(H, "_")[0])
339- let B = split(H, "_")[1]
340- let y = parseIntValue(split(H, "_")[2])
341- let x = split(H, "_")[3]
342- let N = value(addressFromString(split(H, "_")[4]))
343- let z = if ((split(H, "_")[5] == "true"))
347+ let K = valueOrErrorMessage(getString(this, G), "Invalid order id")
348+ let N = split(K, "_")[0]
349+ let O = parseIntValue(split(K, "_")[1])
350+ let P = split(K, "_")[2]
351+ let Q = parseIntValue(split(K, "_")[3])
352+ let R = split(K, "_")[4]
353+ let S = value(addressFromString(split(K, "_")[5]))
354+ let T = if ((split(K, "_")[6] == "true"))
344355 then true
345356 else false
346- let A = split(H, "_")[6]
347- let O = parseIntValue(split(H, "_")[7])
348- if ((B != L))
349- then throw(("payment asset must be " + B))
350- else {
351- let P = if ((A != ""))
352- then sigVerify(i.callerPublicKey, fromBase58String(K), fromBase58String(A))
353- else true
354- if (!(P))
355- then throw("The order is private")
356- else {
357- let I = if ((B == "WAVES"))
358- then 8
359- else value(assetInfo(fromBase58String(B))).decimals
360- let T = ((m.amount * y) / pow(10, 0, I, 0, 0, CEILING))
361- if ((T == 0))
362- then throw("invalid amount")
363- else if (if (z)
364- then (M > T)
365- else false)
366- then throw("You must take all or none")
367- else if ((m.amount > (M - O)))
368- then throw("not enougth asset in order")
369- else {
370- let E = {
371- let e = getString(this, "orders")
372- if ($isInstanceOf(e, "String"))
373- then {
374- let F = e
375- F
376- }
377- else if ($isInstanceOf(e, "Unit"))
378- then ""
379- else throw()
357+ let U = split(K, "_")[7]
358+ let V = parseIntValue(split(K, "_")[8])
359+ if ((N != "buy"))
360+ then throw("Invalid order type")
361+ else if ((P != j))
362+ then throw(("payment asset must be " + P))
363+ else {
364+ let W = if ((U != ""))
365+ then sigVerify(n.callerPublicKey, fromBase58String(M), fromBase58String(U))
366+ else true
367+ if (!(W))
368+ then throw("The order is private")
369+ else {
370+ let C = ((L * Q) / O)
371+ if ((C == 0))
372+ then throw("Invalid amount")
373+ else if (if (T)
374+ then (Q > C)
375+ else false)
376+ then throw("You must take all or none")
377+ else if ((C > (Q - V)))
378+ then throw("not enougth asset in order")
379+ else {
380+ let H = {
381+ let e = getString(this, "orders")
382+ if ($isInstanceOf(e, "String"))
383+ then {
384+ let I = e
385+ I
386+ }
387+ else if ($isInstanceOf(e, "Unit"))
388+ then ""
389+ else throw()
390+ }
391+ let X = (dropRight(K, size(split(K, "_")[7])) + toString((V + C)))
392+ let Y = value(indexOf(H, G))
393+ let Z = if ((Q == (C + V)))
394+ then (take(H, Y) + drop(H, (Y + size(G))))
395+ else H
396+ ScriptResult(WriteSet([DataEntry("orders", Z), DataEntry(G, X)]), TransferSet([ScriptTransfer(n.caller, C, if ((R == "WAVES"))
397+ then unit
398+ else fromBase58String(R)), ScriptTransfer(S, L, if ((P == "WAVES"))
399+ then unit
400+ else fromBase58String(P))]))
380401 }
381- let Q = (dropRight(H, size(split(H, "_")[7])) + toString((O + m.amount)))
382- let R = value(indexOf(E, D))
383- let S = if ((M == (m.amount + O)))
384- then (take(E, R) + drop(E, (R + size(D))))
385- else E
386- ScriptResult(WriteSet([DataEntry("orders", S), DataEntry(D, Q)]), TransferSet([ScriptTransfer(i.caller, T, if ((x == "WAVES"))
387- then unit
388- else fromBase58String(x)), ScriptTransfer(N, m.amount, if ((B == "WAVES"))
389- then unit
390- else fromBase58String(B))]))
391- }
392- }
393- }
402+ }
403+ }
394404 }
395405 }
396406
397407
398408
399-@Callable(i)
400-func returnBuy (D) = {
401- let H = valueOrErrorMessage(getString(this, D), "Invalid order id")
402- let M = parseIntValue(split(H, "_")[0])
403- let B = split(H, "_")[1]
404- let y = parseIntValue(split(H, "_")[2])
405- let x = split(H, "_")[3]
406- let N = value(addressFromString(split(H, "_")[4]))
407- let z = if ((split(H, "_")[5] == "true"))
409+@Callable(n)
410+func returnSell (G) = {
411+ let K = valueOrErrorMessage(getString(this, ("sell_" + G)), "Invalid order id")
412+ let N = split(K, "_")[0]
413+ let O = parseIntValue(split(K, "_")[1])
414+ let P = split(K, "_")[2]
415+ let Q = parseIntValue(split(K, "_")[3])
416+ let R = split(K, "_")[4]
417+ let S = value(addressFromString(split(K, "_")[5]))
418+ let T = if ((split(K, "_")[6] == "true"))
408419 then true
409420 else false
410- let A = split(H, "_")[6]
411- let O = parseIntValue(split(H, "_")[7])
412- if ((N != i.caller))
413- then throw("Return should be called by order owner")
414- else {
415- let I = if ((B == "WAVES"))
416- then 8
417- else value(assetInfo(fromBase58String(B))).decimals
418- let U = (((M - O) * y) / pow(10, 0, I, 0, 0, CEILING))
419- if ((0 >= U))
420- then throw("nothing to return")
421- else {
422- let E = {
423- let e = getString(this, "orders")
424- if ($isInstanceOf(e, "String"))
425- then {
426- let F = e
427- F
428- }
429- else if ($isInstanceOf(e, "Unit"))
430- then ""
431- else throw()
421+ let U = split(K, "_")[7]
422+ let V = parseIntValue(split(K, "_")[8])
423+ if ((N != "sell"))
424+ then throw("Invalid order type")
425+ else if ((S != n.caller))
426+ then throw("return should be called by order owner")
427+ else {
428+ let aa = (O - V)
429+ if ((0 >= aa))
430+ then throw("nothing to return")
431+ else {
432+ let H = {
433+ let e = getString(this, "orders")
434+ if ($isInstanceOf(e, "String"))
435+ then {
436+ let I = e
437+ I
438+ }
439+ else if ($isInstanceOf(e, "Unit"))
440+ then ""
441+ else throw()
442+ }
443+ let X = (dropRight(K, size(split(K, "_")[7])) + toString(O))
444+ let Y = value(indexOf(H, G))
445+ let Z = (take(H, Y) + drop(H, (Y + size(G))))
446+ ScriptResult(WriteSet([DataEntry("orders", Z), DataEntry(G, X)]), TransferSet([ScriptTransfer(n.caller, aa, if ((P == "WAVES"))
447+ then unit
448+ else fromBase58String(P))]))
432449 }
433- let Q = (dropRight(H, size(split(H, "_")[7])) + toString(M))
434- let R = value(indexOf(E, D))
435- let S = (take(E, R) + drop(E, (R + size(D))))
436- ScriptResult(WriteSet([DataEntry("orders", S), DataEntry(D, Q)]), TransferSet([ScriptTransfer(i.caller, U, if ((x == "WAVES"))
437- then unit
438- else fromBase58String(x))]))
439- }
440- }
450+ }
441451 }
442452
443453
444454
445-@Callable(i)
446-func returnSell (D) = {
447- let H = valueOrErrorMessage(getString(this, D), "Invalid order id")
448- let M = parseIntValue(split(H, "_")[0])
449- let B = split(H, "_")[1]
450- let y = parseIntValue(split(H, "_")[2])
451- let x = split(H, "_")[3]
452- let N = value(addressFromString(split(H, "_")[4]))
453- let z = if ((split(H, "_")[5] == "true"))
455+@Callable(n)
456+func returnBuy (G) = {
457+ let K = valueOrErrorMessage(getString(this, G), "Invalid order id")
458+ let N = split(K, "_")[0]
459+ let O = parseIntValue(split(K, "_")[1])
460+ let P = split(K, "_")[2]
461+ let Q = parseIntValue(split(K, "_")[3])
462+ let R = split(K, "_")[4]
463+ let S = value(addressFromString(split(K, "_")[5]))
464+ let T = if ((split(K, "_")[6] == "true"))
454465 then true
455466 else false
456- let A = split(H, "_")[6]
457- let O = parseIntValue(split(H, "_")[7])
458- if ((N != i.caller))
459- then throw("return should be called by order owner")
460- else {
461- let U = (M - O)
462- if ((0 >= U))
463- then throw("nothing to return")
464- else {
465- let E = {
466- let e = getString(this, "orders")
467- if ($isInstanceOf(e, "String"))
468- then {
469- let F = e
470- F
471- }
472- else if ($isInstanceOf(e, "Unit"))
473- then ""
474- else throw()
467+ let U = split(K, "_")[7]
468+ let V = parseIntValue(split(K, "_")[8])
469+ if ((N != "buy"))
470+ then throw("Invalid order type")
471+ else if ((S != n.caller))
472+ then throw("Return should be called by order owner")
473+ else {
474+ let aa = (Q - V)
475+ if ((0 >= aa))
476+ then throw("nothing to return")
477+ else {
478+ let H = {
479+ let e = getString(this, "orders")
480+ if ($isInstanceOf(e, "String"))
481+ then {
482+ let I = e
483+ I
484+ }
485+ else if ($isInstanceOf(e, "Unit"))
486+ then ""
487+ else throw()
488+ }
489+ let X = (dropRight(K, size(split(K, "_")[7])) + toString(Q))
490+ let Y = value(indexOf(H, G))
491+ let Z = (take(H, Y) + drop(H, (Y + size(G))))
492+ ScriptResult(WriteSet([DataEntry("orders", Z), DataEntry(G, X)]), TransferSet([ScriptTransfer(n.caller, aa, if ((R == "WAVES"))
493+ then unit
494+ else fromBase58String(R))]))
475495 }
476- let Q = (dropRight(H, size(split(H, "_")[7])) + toString(M))
477- let R = value(indexOf(E, D))
478- let S = (take(E, R) + drop(E, (R + size(D))))
479- ScriptResult(WriteSet([DataEntry("orders", S), DataEntry(D, Q)]), TransferSet([ScriptTransfer(i.caller, U, if ((B == "WAVES"))
480- then unit
481- else fromBase58String(B))]))
482- }
483- }
496+ }
484497 }
485498
486499
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'9qh2MiJhfqNS1o3R5wcUrAAWpeqZs9R8SLwQvCx88Vaf'
55
66 func b (c) = {
77 let d = {
88 let e = getBoolean(this, (c + "_unlimited"))
99 if ($isInstanceOf(e, "Boolean"))
1010 then {
1111 let f = e
1212 f
1313 }
1414 else if ($isInstanceOf(e, "Unit"))
1515 then false
1616 else throw()
1717 }
1818 let g = {
1919 let e = getInteger(this, (c + "_time"))
2020 if ($isInstanceOf(e, "Int"))
2121 then {
2222 let h = e
2323 h
2424 }
2525 else if ($isInstanceOf(e, "Unit"))
2626 then 0
2727 else throw()
2828 }
2929 if (d)
3030 then true
3131 else (g > lastBlock.timestamp)
3232 }
3333
3434
35-@Callable(i)
36-func addAsset (j) = {
37- let k = (100 * 100000000)
38- let l = "100"
39- let m = valueOrErrorMessage(i.payment, "Where is payment?")
40- if (if (isDefined(m.assetId))
41- then (m.assetId != a)
35+func i (j,k) = {
36+ let l = if ((j == "WAVES"))
37+ then 8
38+ else value(assetInfo(fromBase58String(j))).decimals
39+ let m = if ((k == "WAVES"))
40+ then 8
41+ else value(assetInfo(fromBase58String(k))).decimals
42+ (m >= l)
43+ }
44+
45+
46+@Callable(n)
47+func addAsset (o) = {
48+ let p = (100 * 100000000)
49+ let q = "100"
50+ let r = valueOrErrorMessage(n.payment, "Where is payment?")
51+ if (if (isDefined(r.assetId))
52+ then (r.assetId != a)
4253 else false)
4354 then throw("OTCu or WAVES only")
44- else if ((m.amount != k))
45- then throw((("You have to pay " + l) + " OTCu or WAVES"))
46- else if (!(isDefined(assetInfo(fromBase58String(j)))))
55+ else if ((r.amount != p))
56+ then throw((("You have to pay " + q) + " OTCu or WAVES"))
57+ else if (!(isDefined(assetInfo(fromBase58String(o)))))
4758 then throw("There is no asset with specified id")
4859 else {
49- let n = {
60+ let s = {
5061 let e = getString(this, "assets")
5162 if ($isInstanceOf(e, "String"))
5263 then {
53- let o = e
54- o
64+ let t = e
65+ t
5566 }
5667 else if ($isInstanceOf(e, "Unit"))
5768 then ""
5869 else throw()
5970 }
60- if (isDefined(indexOf(n, j)))
71+ if (isDefined(indexOf(s, o)))
6172 then throw("Asset is already available")
62- else WriteSet([DataEntry("assets", (n + j))])
73+ else WriteSet([DataEntry("assets", (s + o))])
6374 }
6475 }
6576
6677
6778
68-@Callable(i)
69-func pro (p) = {
70- let c = toBase58String(i.caller.bytes)
71- let q = (50 * 100000000)
72- let r = "50"
73- let s = (10 * 100000000)
74- let t = "10"
75- let m = valueOrErrorMessage(i.payment, "Where is payment?")
76- if (if (isDefined(m.assetId))
77- then (m.assetId != a)
79+@Callable(n)
80+func pro (u) = {
81+ let c = toBase58String(n.caller.bytes)
82+ let v = (50 * 100000000)
83+ let w = "50"
84+ let x = (10 * 100000000)
85+ let y = "10"
86+ let r = valueOrErrorMessage(n.payment, "Where is payment?")
87+ if (if (isDefined(r.assetId))
88+ then (r.assetId != a)
7889 else false)
7990 then throw("OTCu or WAVES only")
80- else if (if (p)
81- then (m.amount != q)
91+ else if (if (u)
92+ then (r.amount != v)
8293 else false)
83- then throw((("You have to pay " + r) + " OTCu or WAVES"))
84- else if (if (!(p))
85- then (m.amount != s)
94+ then throw((("You have to pay " + w) + " OTCu or WAVES"))
95+ else if (if (!(u))
96+ then (r.amount != x)
8697 else false)
87- then throw((("You have to pay " + t) + " OTCu or WAVES"))
98+ then throw((("You have to pay " + y) + " OTCu or WAVES"))
8899 else {
89- let u = {
100+ let z = {
90101 let e = getBoolean(this, (c + "_unlimited"))
91102 if ($isInstanceOf(e, "Boolean"))
92103 then {
93104 let f = e
94105 f
95106 }
96107 else if ($isInstanceOf(e, "Unit"))
97108 then false
98109 else throw()
99110 }
100- let v = {
111+ let A = {
101112 let e = getInteger(this, (c + "_time"))
102113 if ($isInstanceOf(e, "Int"))
103114 then {
104115 let h = e
105116 h
106117 }
107118 else if ($isInstanceOf(e, "Unit"))
108119 then 0
109120 else throw()
110121 }
111- if (u)
122+ if (z)
112123 then throw("You have unlimited PRO status already. What do you want?")
113124 else {
114- let w = 2629743000
115- WriteSet([DataEntry((c + "_unlimited"), p), DataEntry((c + "_time"), if (p)
125+ let B = 2629743000
126+ WriteSet([DataEntry((c + "_unlimited"), u), DataEntry((c + "_time"), if (u)
116127 then 0
117- else (v + w))])
128+ else (A + B))])
118129 }
119130 }
120131 }
121132
122133
123134
124-@Callable(i)
125-func makeSell (x,y,z,A) = if (if ((x != "WAVES"))
126- then !(isDefined(assetInfo(fromBase58String(x))))
135+@Callable(n)
136+func makeSell (k,C,D,E) = if (if ((k != "WAVES"))
137+ then !(isDefined(assetInfo(fromBase58String(k))))
127138 else false)
128139 then throw("There is no asset with specified id")
129- else if ((0 >= y))
130- then throw("price must be positive")
140+ else if ((0 >= C))
141+ then throw("Amount of price asset must be positive")
131142 else {
132- let m = valueOrErrorMessage(i.payment, "where is payment?")
133- if ((0 >= m.amount))
134- then throw("amount must be positive")
143+ let r = valueOrErrorMessage(n.payment, "Where is payment?")
144+ if ((0 >= r.amount))
145+ then throw("Amount must be positive")
135146 else {
136- let B = {
137- let e = m.assetId
147+ let j = {
148+ let e = r.assetId
138149 if ($isInstanceOf(e, "ByteVector"))
139150 then {
140- let C = e
141- toBase58String(C)
151+ let F = e
152+ toBase58String(F)
142153 }
143154 else "WAVES"
144155 }
145- let n = valueOrErrorMessage(getString(this, "assets"), "There are not available assets")
146- if (if (!(isDefined(indexOf(n, x))))
156+ let s = valueOrErrorMessage(getString(this, "assets"), "There are not available assets")
157+ if (if (!(isDefined(indexOf(s, k))))
147158 then true
148- else !(isDefined(indexOf(n, B))))
159+ else !(isDefined(indexOf(s, j))))
149160 then throw("Asset are not available for trading")
150161 else {
151- let c = toBase58String(i.caller.bytes)
162+ let c = toBase58String(n.caller.bytes)
152163 if (if (!(b(c)))
153- then if (z)
164+ then if (D)
154165 then true
155- else (A != "")
166+ else (E != "")
156167 else false)
157168 then throw("You must have pro status to use these features")
158169 else {
159- let D = toBase58String(i.transactionId)
160- let E = {
170+ let G = toBase58String(n.transactionId)
171+ let H = {
161172 let e = getString(this, "orders")
162173 if ($isInstanceOf(e, "String"))
163174 then {
164- let F = e
165- F
175+ let I = e
176+ I
166177 }
167178 else if ($isInstanceOf(e, "Unit"))
168179 then ""
169180 else throw()
170181 }
171- let G = fromBase58String(A)
172- let H = ((((((((((((((toString(m.amount) + "_") + B) + "_") + toString(y)) + "_") + x) + "_") + c) + "_") + toString(z)) + "_") + A) + "_") + toString(0))
173- WriteSet([DataEntry("orders", (E + D)), DataEntry(D, H)])
182+ let J = fromBase58String(E)
183+ let K = (((((((((((((((("sell" + "_") + toString(r.amount)) + "_") + j) + "_") + toString(C)) + "_") + k) + "_") + c) + "_") + toString(D)) + "_") + E) + "_") + toString(0))
184+ WriteSet([DataEntry("orders", (H + G)), DataEntry(G, K)])
174185 }
175186 }
176187 }
177188 }
178189
179190
180191
181-@Callable(i)
182-func makeBuy (B,y,z,A) = if (if ((B != "WAVES"))
183- then !(isDefined(assetInfo(fromBase58String(B))))
192+@Callable(n)
193+func makeBuy (j,L,D,E) = if (if ((j != "WAVES"))
194+ then !(isDefined(assetInfo(fromBase58String(j))))
184195 else false)
185196 then throw("There is no asset with specified id")
186- else if ((0 >= y))
187- then throw("price must be positive")
197+ else if ((0 >= L))
198+ then throw("Amount must be positive")
188199 else {
189- let m = valueOrErrorMessage(i.payment, "where is payment?")
190- if ((0 >= m.amount))
200+ let r = valueOrErrorMessage(n.payment, "where is payment?")
201+ let C = r.amount
202+ if ((0 >= C))
191203 then throw("amount must be positive")
192204 else {
193- let x = {
194- let e = m.assetId
205+ let k = {
206+ let e = r.assetId
195207 if ($isInstanceOf(e, "ByteVector"))
196208 then {
197- let C = e
198- toBase58String(C)
209+ let F = e
210+ toBase58String(F)
199211 }
200212 else "WAVES"
201213 }
202- let n = valueOrErrorMessage(getString(this, "assets"), "There are not available assets")
203- if (if (!(isDefined(indexOf(n, x))))
214+ let s = valueOrErrorMessage(getString(this, "assets"), "There are not available assets")
215+ if (if (!(isDefined(indexOf(s, k))))
204216 then true
205- else !(isDefined(indexOf(n, B))))
217+ else !(isDefined(indexOf(s, j))))
206218 then throw("Asset are not available for trading")
207219 else {
208- let c = toBase58String(i.caller.bytes)
220+ let c = toBase58String(n.caller.bytes)
209221 if (if (!(b(c)))
210- then if (z)
222+ then if (D)
211223 then true
212- else (A != "")
224+ else (E != "")
213225 else false)
214226 then throw("You must have pro status to use these features")
215227 else {
216- let D = toBase58String(i.transactionId)
217- let E = {
228+ let G = toBase58String(n.transactionId)
229+ let H = {
218230 let e = getString(this, "orders")
219231 if ($isInstanceOf(e, "String"))
220232 then {
221- let F = e
222- F
233+ let I = e
234+ I
223235 }
224236 else if ($isInstanceOf(e, "Unit"))
225237 then ""
226238 else throw()
227239 }
228- let I = if ((B == "WAVES"))
229- then 8
230- else value(assetInfo(fromBase58String(B))).decimals
231- let J = ((m.amount * pow(10, 0, I, 0, 0, CEILING)) / y)
232- if ((J == 0))
240+ if ((L == 0))
233241 then throw("invalid buy amount")
234242 else {
235- let H = ((((((((((((((toString(J) + "_") + B) + "_") + toString(y)) + "_") + x) + "_") + c) + "_") + toString(z)) + "_") + A) + "_") + toString(0))
236- WriteSet([DataEntry("orders", (E + D)), DataEntry(D, H)])
243+ let K = (((((((((((((((("buy" + "_") + toString(L)) + "_") + j) + "_") + toString(C)) + "_") + k) + "_") + c) + "_") + toString(D)) + "_") + E) + "_") + toString(0))
244+ WriteSet([DataEntry("orders", (H + G)), DataEntry(("buy_" + G), K)])
237245 }
238246 }
239247 }
240248 }
241249 }
242250
243251
244252
245-@Callable(i)
246-func takeSell (D,K) = {
247- let m = valueOrErrorMessage(i.payment, "where is payment?")
248- if ((0 >= m.amount))
249- then throw("amount must be positive")
253+@Callable(n)
254+func takeSell (G,M) = {
255+ let r = valueOrErrorMessage(n.payment, "Where is payment?")
256+ let C = r.amount
257+ if ((0 >= C))
258+ then throw("Amount must be positive")
250259 else {
251- let L = {
252- let e = m.assetId
260+ let k = {
261+ let e = r.assetId
253262 if ($isInstanceOf(e, "ByteVector"))
254263 then {
255- let C = e
256- toBase58String(C)
264+ let F = e
265+ toBase58String(F)
257266 }
258267 else "WAVES"
259268 }
260- let H = valueOrErrorMessage(getString(this, D), "Invalid order id")
261- let M = parseIntValue(split(H, "_")[0])
262- let B = split(H, "_")[1]
263- let y = parseIntValue(split(H, "_")[2])
264- let x = split(H, "_")[3]
265- let N = value(addressFromString(split(H, "_")[4]))
266- let z = if ((split(H, "_")[5] == "true"))
269+ let K = valueOrErrorMessage(getString(this, G), "Invalid order id")
270+ let N = split(K, "_")[0]
271+ let O = parseIntValue(split(K, "_")[1])
272+ let P = split(K, "_")[2]
273+ let Q = parseIntValue(split(K, "_")[3])
274+ let R = split(K, "_")[4]
275+ let S = value(addressFromString(split(K, "_")[5]))
276+ let T = if ((split(K, "_")[6] == "true"))
267277 then true
268278 else false
269- let A = split(H, "_")[6]
270- let O = parseIntValue(split(H, "_")[7])
271- if ((x != L))
272- then throw(("Payment asset must be " + x))
273- else {
274- let P = if ((A != ""))
275- then sigVerify(i.callerPublicKey, fromBase58String(K), fromBase58String(A))
276- else true
277- if (!(P))
278- then throw("The order is private")
279- else {
280- let I = if ((B == "WAVES"))
281- then 8
282- else value(assetInfo(fromBase58String(B))).decimals
283- let J = ((m.amount * pow(10, 0, I, 0, 0, CEILING)) / y)
284- if ((J == 0))
285- then throw("Invalid amount")
286- else if (if (z)
287- then (M > J)
288- else false)
289- then throw("You must take all or none")
290- else if ((J > (M - O)))
291- then throw("Not enougth asset in order")
292- else {
293- let E = {
294- let e = getString(this, "orders")
295- if ($isInstanceOf(e, "String"))
296- then {
297- let F = e
298- F
299- }
300- else if ($isInstanceOf(e, "Unit"))
301- then ""
302- else throw()
279+ let U = split(K, "_")[7]
280+ let V = parseIntValue(split(K, "_")[8])
281+ if ((N != "sell"))
282+ then throw("Invalid order type")
283+ else if ((R != k))
284+ then throw(("Payment asset must be " + R))
285+ else {
286+ let W = if ((U != ""))
287+ then sigVerify(n.callerPublicKey, fromBase58String(M), fromBase58String(U))
288+ else true
289+ if (!(W))
290+ then throw("The order is private")
291+ else {
292+ let L = ((C * O) / Q)
293+ if ((L == 0))
294+ then throw("Invalid amount")
295+ else if (if (T)
296+ then (O > L)
297+ else false)
298+ then throw("You must take all or none")
299+ else if ((L > (O - V)))
300+ then throw("Not enougth asset in order")
301+ else {
302+ let H = {
303+ let e = getString(this, "orders")
304+ if ($isInstanceOf(e, "String"))
305+ then {
306+ let I = e
307+ I
308+ }
309+ else if ($isInstanceOf(e, "Unit"))
310+ then ""
311+ else throw()
312+ }
313+ let X = (dropRight(K, size(split(K, "_")[7])) + toString((V + L)))
314+ let Y = value(indexOf(H, G))
315+ let Z = if ((O == (L + V)))
316+ then (take(H, Y) + drop(H, (Y + size(G))))
317+ else H
318+ ScriptResult(WriteSet([DataEntry("orders", Z), DataEntry(G, X)]), TransferSet([ScriptTransfer(n.caller, L, if ((P == "WAVES"))
319+ then unit
320+ else fromBase58String(P)), ScriptTransfer(S, C, if ((R == "WAVES"))
321+ then unit
322+ else fromBase58String(R))]))
303323 }
304- let Q = (dropRight(H, size(split(H, "_")[7])) + toString((O + J)))
305- let R = value(indexOf(E, D))
306- let S = if ((M == (J + O)))
307- then (take(E, R) + drop(E, (R + size(D))))
308- else E
309- ScriptResult(WriteSet([DataEntry("orders", S), DataEntry(D, Q)]), TransferSet([ScriptTransfer(i.caller, J, if ((B == "WAVES"))
310- then unit
311- else fromBase58String(B)), ScriptTransfer(N, m.amount, if ((x == "WAVES"))
312- then unit
313- else fromBase58String(x))]))
314- }
315- }
316- }
324+ }
325+ }
317326 }
318327 }
319328
320329
321330
322-@Callable(i)
323-func takeBuy (D,K) = {
324- let m = valueOrErrorMessage(i.payment, "where is payment?")
325- if ((0 >= m.amount))
331+@Callable(n)
332+func takeBuy (G,M) = {
333+ let r = valueOrErrorMessage(n.payment, "where is payment?")
334+ let L = r.amount
335+ if ((0 >= L))
326336 then throw("amount must be positive")
327337 else {
328- let L = {
329- let e = m.assetId
338+ let j = {
339+ let e = r.assetId
330340 if ($isInstanceOf(e, "ByteVector"))
331341 then {
332- let C = e
333- toBase58String(C)
342+ let F = e
343+ toBase58String(F)
334344 }
335345 else "WAVES"
336346 }
337- let H = valueOrErrorMessage(getString(this, D), "Invalid order id")
338- let M = parseIntValue(split(H, "_")[0])
339- let B = split(H, "_")[1]
340- let y = parseIntValue(split(H, "_")[2])
341- let x = split(H, "_")[3]
342- let N = value(addressFromString(split(H, "_")[4]))
343- let z = if ((split(H, "_")[5] == "true"))
347+ let K = valueOrErrorMessage(getString(this, G), "Invalid order id")
348+ let N = split(K, "_")[0]
349+ let O = parseIntValue(split(K, "_")[1])
350+ let P = split(K, "_")[2]
351+ let Q = parseIntValue(split(K, "_")[3])
352+ let R = split(K, "_")[4]
353+ let S = value(addressFromString(split(K, "_")[5]))
354+ let T = if ((split(K, "_")[6] == "true"))
344355 then true
345356 else false
346- let A = split(H, "_")[6]
347- let O = parseIntValue(split(H, "_")[7])
348- if ((B != L))
349- then throw(("payment asset must be " + B))
350- else {
351- let P = if ((A != ""))
352- then sigVerify(i.callerPublicKey, fromBase58String(K), fromBase58String(A))
353- else true
354- if (!(P))
355- then throw("The order is private")
356- else {
357- let I = if ((B == "WAVES"))
358- then 8
359- else value(assetInfo(fromBase58String(B))).decimals
360- let T = ((m.amount * y) / pow(10, 0, I, 0, 0, CEILING))
361- if ((T == 0))
362- then throw("invalid amount")
363- else if (if (z)
364- then (M > T)
365- else false)
366- then throw("You must take all or none")
367- else if ((m.amount > (M - O)))
368- then throw("not enougth asset in order")
369- else {
370- let E = {
371- let e = getString(this, "orders")
372- if ($isInstanceOf(e, "String"))
373- then {
374- let F = e
375- F
376- }
377- else if ($isInstanceOf(e, "Unit"))
378- then ""
379- else throw()
357+ let U = split(K, "_")[7]
358+ let V = parseIntValue(split(K, "_")[8])
359+ if ((N != "buy"))
360+ then throw("Invalid order type")
361+ else if ((P != j))
362+ then throw(("payment asset must be " + P))
363+ else {
364+ let W = if ((U != ""))
365+ then sigVerify(n.callerPublicKey, fromBase58String(M), fromBase58String(U))
366+ else true
367+ if (!(W))
368+ then throw("The order is private")
369+ else {
370+ let C = ((L * Q) / O)
371+ if ((C == 0))
372+ then throw("Invalid amount")
373+ else if (if (T)
374+ then (Q > C)
375+ else false)
376+ then throw("You must take all or none")
377+ else if ((C > (Q - V)))
378+ then throw("not enougth asset in order")
379+ else {
380+ let H = {
381+ let e = getString(this, "orders")
382+ if ($isInstanceOf(e, "String"))
383+ then {
384+ let I = e
385+ I
386+ }
387+ else if ($isInstanceOf(e, "Unit"))
388+ then ""
389+ else throw()
390+ }
391+ let X = (dropRight(K, size(split(K, "_")[7])) + toString((V + C)))
392+ let Y = value(indexOf(H, G))
393+ let Z = if ((Q == (C + V)))
394+ then (take(H, Y) + drop(H, (Y + size(G))))
395+ else H
396+ ScriptResult(WriteSet([DataEntry("orders", Z), DataEntry(G, X)]), TransferSet([ScriptTransfer(n.caller, C, if ((R == "WAVES"))
397+ then unit
398+ else fromBase58String(R)), ScriptTransfer(S, L, if ((P == "WAVES"))
399+ then unit
400+ else fromBase58String(P))]))
380401 }
381- let Q = (dropRight(H, size(split(H, "_")[7])) + toString((O + m.amount)))
382- let R = value(indexOf(E, D))
383- let S = if ((M == (m.amount + O)))
384- then (take(E, R) + drop(E, (R + size(D))))
385- else E
386- ScriptResult(WriteSet([DataEntry("orders", S), DataEntry(D, Q)]), TransferSet([ScriptTransfer(i.caller, T, if ((x == "WAVES"))
387- then unit
388- else fromBase58String(x)), ScriptTransfer(N, m.amount, if ((B == "WAVES"))
389- then unit
390- else fromBase58String(B))]))
391- }
392- }
393- }
402+ }
403+ }
394404 }
395405 }
396406
397407
398408
399-@Callable(i)
400-func returnBuy (D) = {
401- let H = valueOrErrorMessage(getString(this, D), "Invalid order id")
402- let M = parseIntValue(split(H, "_")[0])
403- let B = split(H, "_")[1]
404- let y = parseIntValue(split(H, "_")[2])
405- let x = split(H, "_")[3]
406- let N = value(addressFromString(split(H, "_")[4]))
407- let z = if ((split(H, "_")[5] == "true"))
409+@Callable(n)
410+func returnSell (G) = {
411+ let K = valueOrErrorMessage(getString(this, ("sell_" + G)), "Invalid order id")
412+ let N = split(K, "_")[0]
413+ let O = parseIntValue(split(K, "_")[1])
414+ let P = split(K, "_")[2]
415+ let Q = parseIntValue(split(K, "_")[3])
416+ let R = split(K, "_")[4]
417+ let S = value(addressFromString(split(K, "_")[5]))
418+ let T = if ((split(K, "_")[6] == "true"))
408419 then true
409420 else false
410- let A = split(H, "_")[6]
411- let O = parseIntValue(split(H, "_")[7])
412- if ((N != i.caller))
413- then throw("Return should be called by order owner")
414- else {
415- let I = if ((B == "WAVES"))
416- then 8
417- else value(assetInfo(fromBase58String(B))).decimals
418- let U = (((M - O) * y) / pow(10, 0, I, 0, 0, CEILING))
419- if ((0 >= U))
420- then throw("nothing to return")
421- else {
422- let E = {
423- let e = getString(this, "orders")
424- if ($isInstanceOf(e, "String"))
425- then {
426- let F = e
427- F
428- }
429- else if ($isInstanceOf(e, "Unit"))
430- then ""
431- else throw()
421+ let U = split(K, "_")[7]
422+ let V = parseIntValue(split(K, "_")[8])
423+ if ((N != "sell"))
424+ then throw("Invalid order type")
425+ else if ((S != n.caller))
426+ then throw("return should be called by order owner")
427+ else {
428+ let aa = (O - V)
429+ if ((0 >= aa))
430+ then throw("nothing to return")
431+ else {
432+ let H = {
433+ let e = getString(this, "orders")
434+ if ($isInstanceOf(e, "String"))
435+ then {
436+ let I = e
437+ I
438+ }
439+ else if ($isInstanceOf(e, "Unit"))
440+ then ""
441+ else throw()
442+ }
443+ let X = (dropRight(K, size(split(K, "_")[7])) + toString(O))
444+ let Y = value(indexOf(H, G))
445+ let Z = (take(H, Y) + drop(H, (Y + size(G))))
446+ ScriptResult(WriteSet([DataEntry("orders", Z), DataEntry(G, X)]), TransferSet([ScriptTransfer(n.caller, aa, if ((P == "WAVES"))
447+ then unit
448+ else fromBase58String(P))]))
432449 }
433- let Q = (dropRight(H, size(split(H, "_")[7])) + toString(M))
434- let R = value(indexOf(E, D))
435- let S = (take(E, R) + drop(E, (R + size(D))))
436- ScriptResult(WriteSet([DataEntry("orders", S), DataEntry(D, Q)]), TransferSet([ScriptTransfer(i.caller, U, if ((x == "WAVES"))
437- then unit
438- else fromBase58String(x))]))
439- }
440- }
450+ }
441451 }
442452
443453
444454
445-@Callable(i)
446-func returnSell (D) = {
447- let H = valueOrErrorMessage(getString(this, D), "Invalid order id")
448- let M = parseIntValue(split(H, "_")[0])
449- let B = split(H, "_")[1]
450- let y = parseIntValue(split(H, "_")[2])
451- let x = split(H, "_")[3]
452- let N = value(addressFromString(split(H, "_")[4]))
453- let z = if ((split(H, "_")[5] == "true"))
455+@Callable(n)
456+func returnBuy (G) = {
457+ let K = valueOrErrorMessage(getString(this, G), "Invalid order id")
458+ let N = split(K, "_")[0]
459+ let O = parseIntValue(split(K, "_")[1])
460+ let P = split(K, "_")[2]
461+ let Q = parseIntValue(split(K, "_")[3])
462+ let R = split(K, "_")[4]
463+ let S = value(addressFromString(split(K, "_")[5]))
464+ let T = if ((split(K, "_")[6] == "true"))
454465 then true
455466 else false
456- let A = split(H, "_")[6]
457- let O = parseIntValue(split(H, "_")[7])
458- if ((N != i.caller))
459- then throw("return should be called by order owner")
460- else {
461- let U = (M - O)
462- if ((0 >= U))
463- then throw("nothing to return")
464- else {
465- let E = {
466- let e = getString(this, "orders")
467- if ($isInstanceOf(e, "String"))
468- then {
469- let F = e
470- F
471- }
472- else if ($isInstanceOf(e, "Unit"))
473- then ""
474- else throw()
467+ let U = split(K, "_")[7]
468+ let V = parseIntValue(split(K, "_")[8])
469+ if ((N != "buy"))
470+ then throw("Invalid order type")
471+ else if ((S != n.caller))
472+ then throw("Return should be called by order owner")
473+ else {
474+ let aa = (Q - V)
475+ if ((0 >= aa))
476+ then throw("nothing to return")
477+ else {
478+ let H = {
479+ let e = getString(this, "orders")
480+ if ($isInstanceOf(e, "String"))
481+ then {
482+ let I = e
483+ I
484+ }
485+ else if ($isInstanceOf(e, "Unit"))
486+ then ""
487+ else throw()
488+ }
489+ let X = (dropRight(K, size(split(K, "_")[7])) + toString(Q))
490+ let Y = value(indexOf(H, G))
491+ let Z = (take(H, Y) + drop(H, (Y + size(G))))
492+ ScriptResult(WriteSet([DataEntry("orders", Z), DataEntry(G, X)]), TransferSet([ScriptTransfer(n.caller, aa, if ((R == "WAVES"))
493+ then unit
494+ else fromBase58String(R))]))
475495 }
476- let Q = (dropRight(H, size(split(H, "_")[7])) + toString(M))
477- let R = value(indexOf(E, D))
478- let S = (take(E, R) + drop(E, (R + size(D))))
479- ScriptResult(WriteSet([DataEntry("orders", S), DataEntry(D, Q)]), TransferSet([ScriptTransfer(i.caller, U, if ((B == "WAVES"))
480- then unit
481- else fromBase58String(B))]))
482- }
483- }
496+ }
484497 }
485498
486499

github/deemru/w8io/169f3d6 
121.57 ms