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
2323 if (statusUnlimited)
2424 then true
2525 else (statusTime > lastBlock.timestamp)
26+ }
27+
28+
29+func checkDecimals (amountAsset,priceAsset) = {
30+ let amountAssetDecimals = if ((amountAsset == "WAVES"))
31+ then 8
32+ else value(assetInfo(fromBase58String(amountAsset))).decimals
33+ let priceAssetDecimals = if ((priceAsset == "WAVES"))
34+ then 8
35+ else value(assetInfo(fromBase58String(priceAsset))).decimals
36+ (priceAssetDecimals >= amountAssetDecimals)
2637 }
2738
2839
107118
108119
109120 @Callable(i)
110-func makeSell (priceAsset,price,all,password) = if (if ((priceAsset != "WAVES"))
121+func makeSell (priceAsset,priceAssetAmount,all,password) = if (if ((priceAsset != "WAVES"))
111122 then !(isDefined(assetInfo(fromBase58String(priceAsset))))
112123 else false)
113124 then throw("There is no asset with specified id")
114- else if ((0 >= price))
115- then throw("price must be positive")
125+ else if ((0 >= priceAssetAmount))
126+ then throw("Amount of price asset must be positive")
116127 else {
117- let payment = valueOrErrorMessage(i.payment, "where is payment?")
128+ let payment = valueOrErrorMessage(i.payment, "Where is payment?")
118129 if ((0 >= payment.amount))
119- then throw("amount must be positive")
130+ then throw("Amount must be positive")
120131 else {
121132 let amountAsset = match payment.assetId {
122133 case p: ByteVector =>
148159 throw()
149160 }
150161 let passwordValid = fromBase58String(password)
151- let data = ((((((((((((((toString(payment.amount) + "_") + amountAsset) + "_") + toString(price)) + "_") + priceAsset) + "_") + address) + "_") + toString(all)) + "_") + password) + "_") + toString(0))
162+ let data = (((((((((((((((("sell" + "_") + toString(payment.amount)) + "_") + amountAsset) + "_") + toString(priceAssetAmount)) + "_") + priceAsset) + "_") + address) + "_") + toString(all)) + "_") + password) + "_") + toString(0))
152163 WriteSet([DataEntry("orders", (orders + orderId)), DataEntry(orderId, data)])
153164 }
154165 }
158169
159170
160171 @Callable(i)
161-func makeBuy (amountAsset,price,all,password) = if (if ((amountAsset != "WAVES"))
172+func makeBuy (amountAsset,amount,all,password) = if (if ((amountAsset != "WAVES"))
162173 then !(isDefined(assetInfo(fromBase58String(amountAsset))))
163174 else false)
164175 then throw("There is no asset with specified id")
165- else if ((0 >= price))
166- then throw("price must be positive")
176+ else if ((0 >= amount))
177+ then throw("Amount must be positive")
167178 else {
168179 let payment = valueOrErrorMessage(i.payment, "where is payment?")
169- if ((0 >= payment.amount))
180+ let priceAssetAmount = payment.amount
181+ if ((0 >= priceAssetAmount))
170182 then throw("amount must be positive")
171183 else {
172184 let priceAsset = match payment.assetId {
198210 case _ =>
199211 throw()
200212 }
201- let amountAssetDecimals = if ((amountAsset == "WAVES"))
202- then 8
203- else value(assetInfo(fromBase58String(amountAsset))).decimals
204- let buyAmount = ((payment.amount * pow(10, 0, amountAssetDecimals, 0, 0, CEILING)) / price)
205- if ((buyAmount == 0))
213+ if ((amount == 0))
206214 then throw("invalid buy amount")
207215 else {
208- let data = ((((((((((((((toString(buyAmount) + "_") + amountAsset) + "_") + toString(price)) + "_") + priceAsset) + "_") + address) + "_") + toString(all)) + "_") + password) + "_") + toString(0))
209- WriteSet([DataEntry("orders", (orders + orderId)), DataEntry(orderId, data)])
216+ let data = (((((((((((((((("buy" + "_") + toString(amount)) + "_") + amountAsset) + "_") + toString(priceAssetAmount)) + "_") + priceAsset) + "_") + address) + "_") + toString(all)) + "_") + password) + "_") + toString(0))
217+ WriteSet([DataEntry("orders", (orders + orderId)), DataEntry(("buy_" + orderId), data)])
210218 }
211219 }
212220 }
217225
218226 @Callable(i)
219227 func takeSell (orderId,sig) = {
220- let payment = valueOrErrorMessage(i.payment, "where is payment?")
221- if ((0 >= payment.amount))
222- then throw("amount must be positive")
228+ let payment = valueOrErrorMessage(i.payment, "Where is payment?")
229+ let priceAssetAmount = payment.amount
230+ if ((0 >= priceAssetAmount))
231+ then throw("Amount must be positive")
223232 else {
224- let paymentAsset = match payment.assetId {
233+ let priceAsset = match payment.assetId {
225234 case p: ByteVector =>
226235 toBase58String(p)
227236 case _ =>
228237 "WAVES"
229238 }
230239 let data = valueOrErrorMessage(getString(this, orderId), "Invalid order id")
231- let amount = parseIntValue(split(data, "_")[0])
232- let amountAsset = split(data, "_")[1]
233- let price = parseIntValue(split(data, "_")[2])
234- let priceAsset = split(data, "_")[3]
235- let owner = value(addressFromString(split(data, "_")[4]))
236- let all = if ((split(data, "_")[5] == "true"))
240+ let orderType = split(data, "_")[0]
241+ let orderAmount = parseIntValue(split(data, "_")[1])
242+ let orderAmountAsset = split(data, "_")[2]
243+ let orderPriceAssetAmount = parseIntValue(split(data, "_")[3])
244+ let orderPriceAsset = split(data, "_")[4]
245+ let orderOwner = value(addressFromString(split(data, "_")[5]))
246+ let orderAll = if ((split(data, "_")[6] == "true"))
237247 then true
238248 else false
239- let password = split(data, "_")[6]
240- let spent = parseIntValue(split(data, "_")[7])
241- if ((priceAsset != paymentAsset))
242- then throw(("Payment asset must be " + priceAsset))
243- else {
244- let valid = if ((password != ""))
245- then sigVerify(i.callerPublicKey, fromBase58String(sig), fromBase58String(password))
246- else true
247- if (!(valid))
248- then throw("The order is private")
249- else {
250- let amountAssetDecimals = if ((amountAsset == "WAVES"))
251- then 8
252- else value(assetInfo(fromBase58String(amountAsset))).decimals
253- let buyAmount = ((payment.amount * pow(10, 0, amountAssetDecimals, 0, 0, CEILING)) / price)
254- if ((buyAmount == 0))
255- then throw("Invalid amount")
256- else if (if (all)
257- then (amount > buyAmount)
258- else false)
259- then throw("You must take all or none")
260- else if ((buyAmount > (amount - spent)))
261- then throw("Not enougth asset in order")
262- else {
263- let orders = match getString(this, "orders") {
264- case s: String =>
265- s
266- case _: Unit =>
267- ""
268- case _ =>
269- throw()
270- }
271- let newData = (dropRight(data, size(split(data, "_")[7])) + toString((spent + buyAmount)))
272- let index = value(indexOf(orders, orderId))
273- let newOrders = if ((amount == (buyAmount + spent)))
274- then (take(orders, index) + drop(orders, (index + size(orderId))))
275- else orders
276- ScriptResult(WriteSet([DataEntry("orders", newOrders), DataEntry(orderId, newData)]), TransferSet([ScriptTransfer(i.caller, buyAmount, if ((amountAsset == "WAVES"))
277- then unit
278- else fromBase58String(amountAsset)), ScriptTransfer(owner, payment.amount, if ((priceAsset == "WAVES"))
279- then unit
280- else fromBase58String(priceAsset))]))
281- }
282- }
283- }
249+ let orderPassword = split(data, "_")[7]
250+ let orderSpent = parseIntValue(split(data, "_")[8])
251+ if ((orderType != "sell"))
252+ then throw("Invalid order type")
253+ else if ((orderPriceAsset != priceAsset))
254+ then throw(("Payment asset must be " + orderPriceAsset))
255+ else {
256+ let valid = if ((orderPassword != ""))
257+ then sigVerify(i.callerPublicKey, fromBase58String(sig), fromBase58String(orderPassword))
258+ else true
259+ if (!(valid))
260+ then throw("The order is private")
261+ else {
262+ let amount = ((priceAssetAmount * orderAmount) / orderPriceAssetAmount)
263+ if ((amount == 0))
264+ then throw("Invalid amount")
265+ else if (if (orderAll)
266+ then (orderAmount > amount)
267+ else false)
268+ then throw("You must take all or none")
269+ else if ((amount > (orderAmount - orderSpent)))
270+ then throw("Not enougth asset in order")
271+ else {
272+ let orders = match getString(this, "orders") {
273+ case s: String =>
274+ s
275+ case _: Unit =>
276+ ""
277+ case _ =>
278+ throw()
279+ }
280+ let newData = (dropRight(data, size(split(data, "_")[7])) + toString((orderSpent + amount)))
281+ let index = value(indexOf(orders, orderId))
282+ let newOrders = if ((orderAmount == (amount + orderSpent)))
283+ then (take(orders, index) + drop(orders, (index + size(orderId))))
284+ else orders
285+ ScriptResult(WriteSet([DataEntry("orders", newOrders), DataEntry(orderId, newData)]), TransferSet([ScriptTransfer(i.caller, amount, if ((orderAmountAsset == "WAVES"))
286+ then unit
287+ else fromBase58String(orderAmountAsset)), ScriptTransfer(orderOwner, priceAssetAmount, if ((orderPriceAsset == "WAVES"))
288+ then unit
289+ else fromBase58String(orderPriceAsset))]))
290+ }
291+ }
292+ }
284293 }
285294 }
286295
289298 @Callable(i)
290299 func takeBuy (orderId,sig) = {
291300 let payment = valueOrErrorMessage(i.payment, "where is payment?")
292- if ((0 >= payment.amount))
301+ let amount = payment.amount
302+ if ((0 >= amount))
293303 then throw("amount must be positive")
294304 else {
295- let paymentAsset = match payment.assetId {
305+ let amountAsset = match payment.assetId {
296306 case p: ByteVector =>
297307 toBase58String(p)
298308 case _ =>
299309 "WAVES"
300310 }
301311 let data = valueOrErrorMessage(getString(this, orderId), "Invalid order id")
302- let amount = parseIntValue(split(data, "_")[0])
303- let amountAsset = split(data, "_")[1]
304- let price = parseIntValue(split(data, "_")[2])
305- let priceAsset = split(data, "_")[3]
306- let owner = value(addressFromString(split(data, "_")[4]))
307- let all = if ((split(data, "_")[5] == "true"))
312+ let orderType = split(data, "_")[0]
313+ let orderAmount = parseIntValue(split(data, "_")[1])
314+ let orderAmountAsset = split(data, "_")[2]
315+ let orderPriceAssetAmount = parseIntValue(split(data, "_")[3])
316+ let orderPriceAsset = split(data, "_")[4]
317+ let orderOwner = value(addressFromString(split(data, "_")[5]))
318+ let orderAll = if ((split(data, "_")[6] == "true"))
308319 then true
309320 else false
310- let password = split(data, "_")[6]
311- let spent = parseIntValue(split(data, "_")[7])
312- if ((amountAsset != paymentAsset))
313- then throw(("payment asset must be " + amountAsset))
314- else {
315- let valid = if ((password != ""))
316- then sigVerify(i.callerPublicKey, fromBase58String(sig), fromBase58String(password))
317- else true
318- if (!(valid))
319- then throw("The order is private")
320- else {
321- let amountAssetDecimals = if ((amountAsset == "WAVES"))
322- then 8
323- else value(assetInfo(fromBase58String(amountAsset))).decimals
324- let priceAmount = ((payment.amount * price) / pow(10, 0, amountAssetDecimals, 0, 0, CEILING))
325- if ((priceAmount == 0))
326- then throw("invalid amount")
327- else if (if (all)
328- then (amount > priceAmount)
329- else false)
330- then throw("You must take all or none")
331- else if ((payment.amount > (amount - spent)))
332- then throw("not enougth asset in order")
333- else {
334- let orders = match getString(this, "orders") {
335- case s: String =>
336- s
337- case _: Unit =>
338- ""
339- case _ =>
340- throw()
341- }
342- let newData = (dropRight(data, size(split(data, "_")[7])) + toString((spent + payment.amount)))
343- let index = value(indexOf(orders, orderId))
344- let newOrders = if ((amount == (payment.amount + spent)))
345- then (take(orders, index) + drop(orders, (index + size(orderId))))
346- else orders
347- ScriptResult(WriteSet([DataEntry("orders", newOrders), DataEntry(orderId, newData)]), TransferSet([ScriptTransfer(i.caller, priceAmount, if ((priceAsset == "WAVES"))
348- then unit
349- else fromBase58String(priceAsset)), ScriptTransfer(owner, payment.amount, if ((amountAsset == "WAVES"))
350- then unit
351- else fromBase58String(amountAsset))]))
352- }
353- }
354- }
321+ let orderPassword = split(data, "_")[7]
322+ let orderSpent = parseIntValue(split(data, "_")[8])
323+ if ((orderType != "buy"))
324+ then throw("Invalid order type")
325+ else if ((orderAmountAsset != amountAsset))
326+ then throw(("payment asset must be " + orderAmountAsset))
327+ else {
328+ let valid = if ((orderPassword != ""))
329+ then sigVerify(i.callerPublicKey, fromBase58String(sig), fromBase58String(orderPassword))
330+ else true
331+ if (!(valid))
332+ then throw("The order is private")
333+ else {
334+ let priceAssetAmount = ((amount * orderPriceAssetAmount) / orderAmount)
335+ if ((priceAssetAmount == 0))
336+ then throw("Invalid amount")
337+ else if (if (orderAll)
338+ then (orderPriceAssetAmount > priceAssetAmount)
339+ else false)
340+ then throw("You must take all or none")
341+ else if ((priceAssetAmount > (orderPriceAssetAmount - orderSpent)))
342+ then throw("not enougth asset in order")
343+ else {
344+ let orders = match getString(this, "orders") {
345+ case s: String =>
346+ s
347+ case _: Unit =>
348+ ""
349+ case _ =>
350+ throw()
351+ }
352+ let newData = (dropRight(data, size(split(data, "_")[7])) + toString((orderSpent + priceAssetAmount)))
353+ let index = value(indexOf(orders, orderId))
354+ let newOrders = if ((orderPriceAssetAmount == (priceAssetAmount + orderSpent)))
355+ then (take(orders, index) + drop(orders, (index + size(orderId))))
356+ else orders
357+ ScriptResult(WriteSet([DataEntry("orders", newOrders), DataEntry(orderId, newData)]), TransferSet([ScriptTransfer(i.caller, priceAssetAmount, if ((orderPriceAsset == "WAVES"))
358+ then unit
359+ else fromBase58String(orderPriceAsset)), ScriptTransfer(orderOwner, amount, if ((orderAmountAsset == "WAVES"))
360+ then unit
361+ else fromBase58String(orderAmountAsset))]))
362+ }
363+ }
364+ }
355365 }
366+ }
367+
368+
369+
370+@Callable(i)
371+func returnSell (orderId) = {
372+ let data = valueOrErrorMessage(getString(this, ("sell_" + orderId)), "Invalid order id")
373+ let orderType = split(data, "_")[0]
374+ let orderAmount = parseIntValue(split(data, "_")[1])
375+ let orderAmountAsset = split(data, "_")[2]
376+ let orderPriceAssetAmount = parseIntValue(split(data, "_")[3])
377+ let orderPriceAsset = split(data, "_")[4]
378+ let orderOwner = value(addressFromString(split(data, "_")[5]))
379+ let orderAll = if ((split(data, "_")[6] == "true"))
380+ then true
381+ else false
382+ let orderPassword = split(data, "_")[7]
383+ let orderSpent = parseIntValue(split(data, "_")[8])
384+ if ((orderType != "sell"))
385+ then throw("Invalid order type")
386+ else if ((orderOwner != i.caller))
387+ then throw("return should be called by order owner")
388+ else {
389+ let returnAmount = (orderAmount - orderSpent)
390+ if ((0 >= returnAmount))
391+ then throw("nothing to return")
392+ else {
393+ let orders = match getString(this, "orders") {
394+ case s: String =>
395+ s
396+ case _: Unit =>
397+ ""
398+ case _ =>
399+ throw()
400+ }
401+ let newData = (dropRight(data, size(split(data, "_")[7])) + toString(orderAmount))
402+ let index = value(indexOf(orders, orderId))
403+ let newOrders = (take(orders, index) + drop(orders, (index + size(orderId))))
404+ ScriptResult(WriteSet([DataEntry("orders", newOrders), DataEntry(orderId, newData)]), TransferSet([ScriptTransfer(i.caller, returnAmount, if ((orderAmountAsset == "WAVES"))
405+ then unit
406+ else fromBase58String(orderAmountAsset))]))
407+ }
408+ }
356409 }
357410
358411
360413 @Callable(i)
361414 func returnBuy (orderId) = {
362415 let data = valueOrErrorMessage(getString(this, orderId), "Invalid order id")
363- let amount = parseIntValue(split(data, "_")[0])
364- let amountAsset = split(data, "_")[1]
365- let price = parseIntValue(split(data, "_")[2])
366- let priceAsset = split(data, "_")[3]
367- let owner = value(addressFromString(split(data, "_")[4]))
368- let all = if ((split(data, "_")[5] == "true"))
416+ let orderType = split(data, "_")[0]
417+ let orderAmount = parseIntValue(split(data, "_")[1])
418+ let orderAmountAsset = split(data, "_")[2]
419+ let orderPriceAssetAmount = parseIntValue(split(data, "_")[3])
420+ let orderPriceAsset = split(data, "_")[4]
421+ let orderOwner = value(addressFromString(split(data, "_")[5]))
422+ let orderAll = if ((split(data, "_")[6] == "true"))
369423 then true
370424 else false
371- let password = split(data, "_")[6]
372- let spent = parseIntValue(split(data, "_")[7])
373- if ((owner != i.caller))
374- then throw("Return should be called by order owner")
375- else {
376- let amountAssetDecimals = if ((amountAsset == "WAVES"))
377- then 8
378- else value(assetInfo(fromBase58String(amountAsset))).decimals
379- let returnAmount = (((amount - spent) * price) / pow(10, 0, amountAssetDecimals, 0, 0, CEILING))
380- if ((0 >= returnAmount))
381- then throw("nothing to return")
382- else {
383- let orders = match getString(this, "orders") {
384- case s: String =>
385- s
386- case _: Unit =>
387- ""
388- case _ =>
389- throw()
390- }
391- let newData = (dropRight(data, size(split(data, "_")[7])) + toString(amount))
392- let index = value(indexOf(orders, orderId))
393- let newOrders = (take(orders, index) + drop(orders, (index + size(orderId))))
394- ScriptResult(WriteSet([DataEntry("orders", newOrders), DataEntry(orderId, newData)]), TransferSet([ScriptTransfer(i.caller, returnAmount, if ((priceAsset == "WAVES"))
395- then unit
396- else fromBase58String(priceAsset))]))
397- }
398- }
399- }
400-
401-
402-
403-@Callable(i)
404-func returnSell (orderId) = {
405- let data = valueOrErrorMessage(getString(this, orderId), "Invalid order id")
406- let amount = parseIntValue(split(data, "_")[0])
407- let amountAsset = split(data, "_")[1]
408- let price = parseIntValue(split(data, "_")[2])
409- let priceAsset = split(data, "_")[3]
410- let owner = value(addressFromString(split(data, "_")[4]))
411- let all = if ((split(data, "_")[5] == "true"))
412- then true
413- else false
414- let password = split(data, "_")[6]
415- let spent = parseIntValue(split(data, "_")[7])
416- if ((owner != i.caller))
417- then throw("return should be called by order owner")
418- else {
419- let returnAmount = (amount - spent)
420- if ((0 >= returnAmount))
421- then throw("nothing to return")
422- else {
423- let orders = match getString(this, "orders") {
424- case s: String =>
425- s
426- case _: Unit =>
427- ""
428- case _ =>
429- throw()
430- }
431- let newData = (dropRight(data, size(split(data, "_")[7])) + toString(amount))
432- let index = value(indexOf(orders, orderId))
433- let newOrders = (take(orders, index) + drop(orders, (index + size(orderId))))
434- ScriptResult(WriteSet([DataEntry("orders", newOrders), DataEntry(orderId, newData)]), TransferSet([ScriptTransfer(i.caller, returnAmount, if ((amountAsset == "WAVES"))
435- then unit
436- else fromBase58String(amountAsset))]))
437- }
438- }
425+ let orderPassword = split(data, "_")[7]
426+ let orderSpent = parseIntValue(split(data, "_")[8])
427+ if ((orderType != "buy"))
428+ then throw("Invalid order type")
429+ else if ((orderOwner != i.caller))
430+ then throw("Return should be called by order owner")
431+ else {
432+ let returnAmount = (orderPriceAssetAmount - orderSpent)
433+ if ((0 >= returnAmount))
434+ then throw("nothing to return")
435+ else {
436+ let orders = match getString(this, "orders") {
437+ case s: String =>
438+ s
439+ case _: Unit =>
440+ ""
441+ case _ =>
442+ throw()
443+ }
444+ let newData = (dropRight(data, size(split(data, "_")[7])) + toString(orderPriceAssetAmount))
445+ let index = value(indexOf(orders, orderId))
446+ let newOrders = (take(orders, index) + drop(orders, (index + size(orderId))))
447+ ScriptResult(WriteSet([DataEntry("orders", newOrders), DataEntry(orderId, newData)]), TransferSet([ScriptTransfer(i.caller, returnAmount, if ((orderPriceAsset == "WAVES"))
448+ then unit
449+ else fromBase58String(orderPriceAsset))]))
450+ }
451+ }
439452 }
440453
441454
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let uTokenId = base58'9qh2MiJhfqNS1o3R5wcUrAAWpeqZs9R8SLwQvCx88Vaf'
55
66 func checkStatus (address) = {
77 let statusUnlimited = match getBoolean(this, (address + "_unlimited")) {
88 case bool: Boolean =>
99 bool
1010 case _: Unit =>
1111 false
1212 case _ =>
1313 throw()
1414 }
1515 let statusTime = match getInteger(this, (address + "_time")) {
1616 case int: Int =>
1717 int
1818 case _: Unit =>
1919 0
2020 case _ =>
2121 throw()
2222 }
2323 if (statusUnlimited)
2424 then true
2525 else (statusTime > lastBlock.timestamp)
26+ }
27+
28+
29+func checkDecimals (amountAsset,priceAsset) = {
30+ let amountAssetDecimals = if ((amountAsset == "WAVES"))
31+ then 8
32+ else value(assetInfo(fromBase58String(amountAsset))).decimals
33+ let priceAssetDecimals = if ((priceAsset == "WAVES"))
34+ then 8
35+ else value(assetInfo(fromBase58String(priceAsset))).decimals
36+ (priceAssetDecimals >= amountAssetDecimals)
2637 }
2738
2839
2940 @Callable(i)
3041 func addAsset (assetId) = {
3142 let addingPrice = (100 * 100000000)
3243 let addingPriceStr = "100"
3344 let payment = valueOrErrorMessage(i.payment, "Where is payment?")
3445 if (if (isDefined(payment.assetId))
3546 then (payment.assetId != uTokenId)
3647 else false)
3748 then throw("OTCu or WAVES only")
3849 else if ((payment.amount != addingPrice))
3950 then throw((("You have to pay " + addingPriceStr) + " OTCu or WAVES"))
4051 else if (!(isDefined(assetInfo(fromBase58String(assetId)))))
4152 then throw("There is no asset with specified id")
4253 else {
4354 let assets = match getString(this, "assets") {
4455 case str: String =>
4556 str
4657 case _: Unit =>
4758 ""
4859 case _ =>
4960 throw()
5061 }
5162 if (isDefined(indexOf(assets, assetId)))
5263 then throw("Asset is already available")
5364 else WriteSet([DataEntry("assets", (assets + assetId))])
5465 }
5566 }
5667
5768
5869
5970 @Callable(i)
6071 func pro (unlimited) = {
6172 let address = toBase58String(i.caller.bytes)
6273 let unlimitedPrice = (50 * 100000000)
6374 let unlimitedPriceStr = "50"
6475 let monthPrice = (10 * 100000000)
6576 let monthPriceStr = "10"
6677 let payment = valueOrErrorMessage(i.payment, "Where is payment?")
6778 if (if (isDefined(payment.assetId))
6879 then (payment.assetId != uTokenId)
6980 else false)
7081 then throw("OTCu or WAVES only")
7182 else if (if (unlimited)
7283 then (payment.amount != unlimitedPrice)
7384 else false)
7485 then throw((("You have to pay " + unlimitedPriceStr) + " OTCu or WAVES"))
7586 else if (if (!(unlimited))
7687 then (payment.amount != monthPrice)
7788 else false)
7889 then throw((("You have to pay " + monthPriceStr) + " OTCu or WAVES"))
7990 else {
8091 let currentUnlimited = match getBoolean(this, (address + "_unlimited")) {
8192 case bool: Boolean =>
8293 bool
8394 case _: Unit =>
8495 false
8596 case _ =>
8697 throw()
8798 }
8899 let currentTime = match getInteger(this, (address + "_time")) {
89100 case int: Int =>
90101 int
91102 case _: Unit =>
92103 0
93104 case _ =>
94105 throw()
95106 }
96107 if (currentUnlimited)
97108 then throw("You have unlimited PRO status already. What do you want?")
98109 else {
99110 let month = 2629743000
100111 WriteSet([DataEntry((address + "_unlimited"), unlimited), DataEntry((address + "_time"), if (unlimited)
101112 then 0
102113 else (currentTime + month))])
103114 }
104115 }
105116 }
106117
107118
108119
109120 @Callable(i)
110-func makeSell (priceAsset,price,all,password) = if (if ((priceAsset != "WAVES"))
121+func makeSell (priceAsset,priceAssetAmount,all,password) = if (if ((priceAsset != "WAVES"))
111122 then !(isDefined(assetInfo(fromBase58String(priceAsset))))
112123 else false)
113124 then throw("There is no asset with specified id")
114- else if ((0 >= price))
115- then throw("price must be positive")
125+ else if ((0 >= priceAssetAmount))
126+ then throw("Amount of price asset must be positive")
116127 else {
117- let payment = valueOrErrorMessage(i.payment, "where is payment?")
128+ let payment = valueOrErrorMessage(i.payment, "Where is payment?")
118129 if ((0 >= payment.amount))
119- then throw("amount must be positive")
130+ then throw("Amount must be positive")
120131 else {
121132 let amountAsset = match payment.assetId {
122133 case p: ByteVector =>
123134 toBase58String(p)
124135 case _ =>
125136 "WAVES"
126137 }
127138 let assets = valueOrErrorMessage(getString(this, "assets"), "There are not available assets")
128139 if (if (!(isDefined(indexOf(assets, priceAsset))))
129140 then true
130141 else !(isDefined(indexOf(assets, amountAsset))))
131142 then throw("Asset are not available for trading")
132143 else {
133144 let address = toBase58String(i.caller.bytes)
134145 if (if (!(checkStatus(address)))
135146 then if (all)
136147 then true
137148 else (password != "")
138149 else false)
139150 then throw("You must have pro status to use these features")
140151 else {
141152 let orderId = toBase58String(i.transactionId)
142153 let orders = match getString(this, "orders") {
143154 case s: String =>
144155 s
145156 case _: Unit =>
146157 ""
147158 case _ =>
148159 throw()
149160 }
150161 let passwordValid = fromBase58String(password)
151- let data = ((((((((((((((toString(payment.amount) + "_") + amountAsset) + "_") + toString(price)) + "_") + priceAsset) + "_") + address) + "_") + toString(all)) + "_") + password) + "_") + toString(0))
162+ let data = (((((((((((((((("sell" + "_") + toString(payment.amount)) + "_") + amountAsset) + "_") + toString(priceAssetAmount)) + "_") + priceAsset) + "_") + address) + "_") + toString(all)) + "_") + password) + "_") + toString(0))
152163 WriteSet([DataEntry("orders", (orders + orderId)), DataEntry(orderId, data)])
153164 }
154165 }
155166 }
156167 }
157168
158169
159170
160171 @Callable(i)
161-func makeBuy (amountAsset,price,all,password) = if (if ((amountAsset != "WAVES"))
172+func makeBuy (amountAsset,amount,all,password) = if (if ((amountAsset != "WAVES"))
162173 then !(isDefined(assetInfo(fromBase58String(amountAsset))))
163174 else false)
164175 then throw("There is no asset with specified id")
165- else if ((0 >= price))
166- then throw("price must be positive")
176+ else if ((0 >= amount))
177+ then throw("Amount must be positive")
167178 else {
168179 let payment = valueOrErrorMessage(i.payment, "where is payment?")
169- if ((0 >= payment.amount))
180+ let priceAssetAmount = payment.amount
181+ if ((0 >= priceAssetAmount))
170182 then throw("amount must be positive")
171183 else {
172184 let priceAsset = match payment.assetId {
173185 case p: ByteVector =>
174186 toBase58String(p)
175187 case _ =>
176188 "WAVES"
177189 }
178190 let assets = valueOrErrorMessage(getString(this, "assets"), "There are not available assets")
179191 if (if (!(isDefined(indexOf(assets, priceAsset))))
180192 then true
181193 else !(isDefined(indexOf(assets, amountAsset))))
182194 then throw("Asset are not available for trading")
183195 else {
184196 let address = toBase58String(i.caller.bytes)
185197 if (if (!(checkStatus(address)))
186198 then if (all)
187199 then true
188200 else (password != "")
189201 else false)
190202 then throw("You must have pro status to use these features")
191203 else {
192204 let orderId = toBase58String(i.transactionId)
193205 let orders = match getString(this, "orders") {
194206 case s: String =>
195207 s
196208 case _: Unit =>
197209 ""
198210 case _ =>
199211 throw()
200212 }
201- let amountAssetDecimals = if ((amountAsset == "WAVES"))
202- then 8
203- else value(assetInfo(fromBase58String(amountAsset))).decimals
204- let buyAmount = ((payment.amount * pow(10, 0, amountAssetDecimals, 0, 0, CEILING)) / price)
205- if ((buyAmount == 0))
213+ if ((amount == 0))
206214 then throw("invalid buy amount")
207215 else {
208- let data = ((((((((((((((toString(buyAmount) + "_") + amountAsset) + "_") + toString(price)) + "_") + priceAsset) + "_") + address) + "_") + toString(all)) + "_") + password) + "_") + toString(0))
209- WriteSet([DataEntry("orders", (orders + orderId)), DataEntry(orderId, data)])
216+ let data = (((((((((((((((("buy" + "_") + toString(amount)) + "_") + amountAsset) + "_") + toString(priceAssetAmount)) + "_") + priceAsset) + "_") + address) + "_") + toString(all)) + "_") + password) + "_") + toString(0))
217+ WriteSet([DataEntry("orders", (orders + orderId)), DataEntry(("buy_" + orderId), data)])
210218 }
211219 }
212220 }
213221 }
214222 }
215223
216224
217225
218226 @Callable(i)
219227 func takeSell (orderId,sig) = {
220- let payment = valueOrErrorMessage(i.payment, "where is payment?")
221- if ((0 >= payment.amount))
222- then throw("amount must be positive")
228+ let payment = valueOrErrorMessage(i.payment, "Where is payment?")
229+ let priceAssetAmount = payment.amount
230+ if ((0 >= priceAssetAmount))
231+ then throw("Amount must be positive")
223232 else {
224- let paymentAsset = match payment.assetId {
233+ let priceAsset = match payment.assetId {
225234 case p: ByteVector =>
226235 toBase58String(p)
227236 case _ =>
228237 "WAVES"
229238 }
230239 let data = valueOrErrorMessage(getString(this, orderId), "Invalid order id")
231- let amount = parseIntValue(split(data, "_")[0])
232- let amountAsset = split(data, "_")[1]
233- let price = parseIntValue(split(data, "_")[2])
234- let priceAsset = split(data, "_")[3]
235- let owner = value(addressFromString(split(data, "_")[4]))
236- let all = if ((split(data, "_")[5] == "true"))
240+ let orderType = split(data, "_")[0]
241+ let orderAmount = parseIntValue(split(data, "_")[1])
242+ let orderAmountAsset = split(data, "_")[2]
243+ let orderPriceAssetAmount = parseIntValue(split(data, "_")[3])
244+ let orderPriceAsset = split(data, "_")[4]
245+ let orderOwner = value(addressFromString(split(data, "_")[5]))
246+ let orderAll = if ((split(data, "_")[6] == "true"))
237247 then true
238248 else false
239- let password = split(data, "_")[6]
240- let spent = parseIntValue(split(data, "_")[7])
241- if ((priceAsset != paymentAsset))
242- then throw(("Payment asset must be " + priceAsset))
243- else {
244- let valid = if ((password != ""))
245- then sigVerify(i.callerPublicKey, fromBase58String(sig), fromBase58String(password))
246- else true
247- if (!(valid))
248- then throw("The order is private")
249- else {
250- let amountAssetDecimals = if ((amountAsset == "WAVES"))
251- then 8
252- else value(assetInfo(fromBase58String(amountAsset))).decimals
253- let buyAmount = ((payment.amount * pow(10, 0, amountAssetDecimals, 0, 0, CEILING)) / price)
254- if ((buyAmount == 0))
255- then throw("Invalid amount")
256- else if (if (all)
257- then (amount > buyAmount)
258- else false)
259- then throw("You must take all or none")
260- else if ((buyAmount > (amount - spent)))
261- then throw("Not enougth asset in order")
262- else {
263- let orders = match getString(this, "orders") {
264- case s: String =>
265- s
266- case _: Unit =>
267- ""
268- case _ =>
269- throw()
270- }
271- let newData = (dropRight(data, size(split(data, "_")[7])) + toString((spent + buyAmount)))
272- let index = value(indexOf(orders, orderId))
273- let newOrders = if ((amount == (buyAmount + spent)))
274- then (take(orders, index) + drop(orders, (index + size(orderId))))
275- else orders
276- ScriptResult(WriteSet([DataEntry("orders", newOrders), DataEntry(orderId, newData)]), TransferSet([ScriptTransfer(i.caller, buyAmount, if ((amountAsset == "WAVES"))
277- then unit
278- else fromBase58String(amountAsset)), ScriptTransfer(owner, payment.amount, if ((priceAsset == "WAVES"))
279- then unit
280- else fromBase58String(priceAsset))]))
281- }
282- }
283- }
249+ let orderPassword = split(data, "_")[7]
250+ let orderSpent = parseIntValue(split(data, "_")[8])
251+ if ((orderType != "sell"))
252+ then throw("Invalid order type")
253+ else if ((orderPriceAsset != priceAsset))
254+ then throw(("Payment asset must be " + orderPriceAsset))
255+ else {
256+ let valid = if ((orderPassword != ""))
257+ then sigVerify(i.callerPublicKey, fromBase58String(sig), fromBase58String(orderPassword))
258+ else true
259+ if (!(valid))
260+ then throw("The order is private")
261+ else {
262+ let amount = ((priceAssetAmount * orderAmount) / orderPriceAssetAmount)
263+ if ((amount == 0))
264+ then throw("Invalid amount")
265+ else if (if (orderAll)
266+ then (orderAmount > amount)
267+ else false)
268+ then throw("You must take all or none")
269+ else if ((amount > (orderAmount - orderSpent)))
270+ then throw("Not enougth asset in order")
271+ else {
272+ let orders = match getString(this, "orders") {
273+ case s: String =>
274+ s
275+ case _: Unit =>
276+ ""
277+ case _ =>
278+ throw()
279+ }
280+ let newData = (dropRight(data, size(split(data, "_")[7])) + toString((orderSpent + amount)))
281+ let index = value(indexOf(orders, orderId))
282+ let newOrders = if ((orderAmount == (amount + orderSpent)))
283+ then (take(orders, index) + drop(orders, (index + size(orderId))))
284+ else orders
285+ ScriptResult(WriteSet([DataEntry("orders", newOrders), DataEntry(orderId, newData)]), TransferSet([ScriptTransfer(i.caller, amount, if ((orderAmountAsset == "WAVES"))
286+ then unit
287+ else fromBase58String(orderAmountAsset)), ScriptTransfer(orderOwner, priceAssetAmount, if ((orderPriceAsset == "WAVES"))
288+ then unit
289+ else fromBase58String(orderPriceAsset))]))
290+ }
291+ }
292+ }
284293 }
285294 }
286295
287296
288297
289298 @Callable(i)
290299 func takeBuy (orderId,sig) = {
291300 let payment = valueOrErrorMessage(i.payment, "where is payment?")
292- if ((0 >= payment.amount))
301+ let amount = payment.amount
302+ if ((0 >= amount))
293303 then throw("amount must be positive")
294304 else {
295- let paymentAsset = match payment.assetId {
305+ let amountAsset = match payment.assetId {
296306 case p: ByteVector =>
297307 toBase58String(p)
298308 case _ =>
299309 "WAVES"
300310 }
301311 let data = valueOrErrorMessage(getString(this, orderId), "Invalid order id")
302- let amount = parseIntValue(split(data, "_")[0])
303- let amountAsset = split(data, "_")[1]
304- let price = parseIntValue(split(data, "_")[2])
305- let priceAsset = split(data, "_")[3]
306- let owner = value(addressFromString(split(data, "_")[4]))
307- let all = if ((split(data, "_")[5] == "true"))
312+ let orderType = split(data, "_")[0]
313+ let orderAmount = parseIntValue(split(data, "_")[1])
314+ let orderAmountAsset = split(data, "_")[2]
315+ let orderPriceAssetAmount = parseIntValue(split(data, "_")[3])
316+ let orderPriceAsset = split(data, "_")[4]
317+ let orderOwner = value(addressFromString(split(data, "_")[5]))
318+ let orderAll = if ((split(data, "_")[6] == "true"))
308319 then true
309320 else false
310- let password = split(data, "_")[6]
311- let spent = parseIntValue(split(data, "_")[7])
312- if ((amountAsset != paymentAsset))
313- then throw(("payment asset must be " + amountAsset))
314- else {
315- let valid = if ((password != ""))
316- then sigVerify(i.callerPublicKey, fromBase58String(sig), fromBase58String(password))
317- else true
318- if (!(valid))
319- then throw("The order is private")
320- else {
321- let amountAssetDecimals = if ((amountAsset == "WAVES"))
322- then 8
323- else value(assetInfo(fromBase58String(amountAsset))).decimals
324- let priceAmount = ((payment.amount * price) / pow(10, 0, amountAssetDecimals, 0, 0, CEILING))
325- if ((priceAmount == 0))
326- then throw("invalid amount")
327- else if (if (all)
328- then (amount > priceAmount)
329- else false)
330- then throw("You must take all or none")
331- else if ((payment.amount > (amount - spent)))
332- then throw("not enougth asset in order")
333- else {
334- let orders = match getString(this, "orders") {
335- case s: String =>
336- s
337- case _: Unit =>
338- ""
339- case _ =>
340- throw()
341- }
342- let newData = (dropRight(data, size(split(data, "_")[7])) + toString((spent + payment.amount)))
343- let index = value(indexOf(orders, orderId))
344- let newOrders = if ((amount == (payment.amount + spent)))
345- then (take(orders, index) + drop(orders, (index + size(orderId))))
346- else orders
347- ScriptResult(WriteSet([DataEntry("orders", newOrders), DataEntry(orderId, newData)]), TransferSet([ScriptTransfer(i.caller, priceAmount, if ((priceAsset == "WAVES"))
348- then unit
349- else fromBase58String(priceAsset)), ScriptTransfer(owner, payment.amount, if ((amountAsset == "WAVES"))
350- then unit
351- else fromBase58String(amountAsset))]))
352- }
353- }
354- }
321+ let orderPassword = split(data, "_")[7]
322+ let orderSpent = parseIntValue(split(data, "_")[8])
323+ if ((orderType != "buy"))
324+ then throw("Invalid order type")
325+ else if ((orderAmountAsset != amountAsset))
326+ then throw(("payment asset must be " + orderAmountAsset))
327+ else {
328+ let valid = if ((orderPassword != ""))
329+ then sigVerify(i.callerPublicKey, fromBase58String(sig), fromBase58String(orderPassword))
330+ else true
331+ if (!(valid))
332+ then throw("The order is private")
333+ else {
334+ let priceAssetAmount = ((amount * orderPriceAssetAmount) / orderAmount)
335+ if ((priceAssetAmount == 0))
336+ then throw("Invalid amount")
337+ else if (if (orderAll)
338+ then (orderPriceAssetAmount > priceAssetAmount)
339+ else false)
340+ then throw("You must take all or none")
341+ else if ((priceAssetAmount > (orderPriceAssetAmount - orderSpent)))
342+ then throw("not enougth asset in order")
343+ else {
344+ let orders = match getString(this, "orders") {
345+ case s: String =>
346+ s
347+ case _: Unit =>
348+ ""
349+ case _ =>
350+ throw()
351+ }
352+ let newData = (dropRight(data, size(split(data, "_")[7])) + toString((orderSpent + priceAssetAmount)))
353+ let index = value(indexOf(orders, orderId))
354+ let newOrders = if ((orderPriceAssetAmount == (priceAssetAmount + orderSpent)))
355+ then (take(orders, index) + drop(orders, (index + size(orderId))))
356+ else orders
357+ ScriptResult(WriteSet([DataEntry("orders", newOrders), DataEntry(orderId, newData)]), TransferSet([ScriptTransfer(i.caller, priceAssetAmount, if ((orderPriceAsset == "WAVES"))
358+ then unit
359+ else fromBase58String(orderPriceAsset)), ScriptTransfer(orderOwner, amount, if ((orderAmountAsset == "WAVES"))
360+ then unit
361+ else fromBase58String(orderAmountAsset))]))
362+ }
363+ }
364+ }
355365 }
366+ }
367+
368+
369+
370+@Callable(i)
371+func returnSell (orderId) = {
372+ let data = valueOrErrorMessage(getString(this, ("sell_" + orderId)), "Invalid order id")
373+ let orderType = split(data, "_")[0]
374+ let orderAmount = parseIntValue(split(data, "_")[1])
375+ let orderAmountAsset = split(data, "_")[2]
376+ let orderPriceAssetAmount = parseIntValue(split(data, "_")[3])
377+ let orderPriceAsset = split(data, "_")[4]
378+ let orderOwner = value(addressFromString(split(data, "_")[5]))
379+ let orderAll = if ((split(data, "_")[6] == "true"))
380+ then true
381+ else false
382+ let orderPassword = split(data, "_")[7]
383+ let orderSpent = parseIntValue(split(data, "_")[8])
384+ if ((orderType != "sell"))
385+ then throw("Invalid order type")
386+ else if ((orderOwner != i.caller))
387+ then throw("return should be called by order owner")
388+ else {
389+ let returnAmount = (orderAmount - orderSpent)
390+ if ((0 >= returnAmount))
391+ then throw("nothing to return")
392+ else {
393+ let orders = match getString(this, "orders") {
394+ case s: String =>
395+ s
396+ case _: Unit =>
397+ ""
398+ case _ =>
399+ throw()
400+ }
401+ let newData = (dropRight(data, size(split(data, "_")[7])) + toString(orderAmount))
402+ let index = value(indexOf(orders, orderId))
403+ let newOrders = (take(orders, index) + drop(orders, (index + size(orderId))))
404+ ScriptResult(WriteSet([DataEntry("orders", newOrders), DataEntry(orderId, newData)]), TransferSet([ScriptTransfer(i.caller, returnAmount, if ((orderAmountAsset == "WAVES"))
405+ then unit
406+ else fromBase58String(orderAmountAsset))]))
407+ }
408+ }
356409 }
357410
358411
359412
360413 @Callable(i)
361414 func returnBuy (orderId) = {
362415 let data = valueOrErrorMessage(getString(this, orderId), "Invalid order id")
363- let amount = parseIntValue(split(data, "_")[0])
364- let amountAsset = split(data, "_")[1]
365- let price = parseIntValue(split(data, "_")[2])
366- let priceAsset = split(data, "_")[3]
367- let owner = value(addressFromString(split(data, "_")[4]))
368- let all = if ((split(data, "_")[5] == "true"))
416+ let orderType = split(data, "_")[0]
417+ let orderAmount = parseIntValue(split(data, "_")[1])
418+ let orderAmountAsset = split(data, "_")[2]
419+ let orderPriceAssetAmount = parseIntValue(split(data, "_")[3])
420+ let orderPriceAsset = split(data, "_")[4]
421+ let orderOwner = value(addressFromString(split(data, "_")[5]))
422+ let orderAll = if ((split(data, "_")[6] == "true"))
369423 then true
370424 else false
371- let password = split(data, "_")[6]
372- let spent = parseIntValue(split(data, "_")[7])
373- if ((owner != i.caller))
374- then throw("Return should be called by order owner")
375- else {
376- let amountAssetDecimals = if ((amountAsset == "WAVES"))
377- then 8
378- else value(assetInfo(fromBase58String(amountAsset))).decimals
379- let returnAmount = (((amount - spent) * price) / pow(10, 0, amountAssetDecimals, 0, 0, CEILING))
380- if ((0 >= returnAmount))
381- then throw("nothing to return")
382- else {
383- let orders = match getString(this, "orders") {
384- case s: String =>
385- s
386- case _: Unit =>
387- ""
388- case _ =>
389- throw()
390- }
391- let newData = (dropRight(data, size(split(data, "_")[7])) + toString(amount))
392- let index = value(indexOf(orders, orderId))
393- let newOrders = (take(orders, index) + drop(orders, (index + size(orderId))))
394- ScriptResult(WriteSet([DataEntry("orders", newOrders), DataEntry(orderId, newData)]), TransferSet([ScriptTransfer(i.caller, returnAmount, if ((priceAsset == "WAVES"))
395- then unit
396- else fromBase58String(priceAsset))]))
397- }
398- }
399- }
400-
401-
402-
403-@Callable(i)
404-func returnSell (orderId) = {
405- let data = valueOrErrorMessage(getString(this, orderId), "Invalid order id")
406- let amount = parseIntValue(split(data, "_")[0])
407- let amountAsset = split(data, "_")[1]
408- let price = parseIntValue(split(data, "_")[2])
409- let priceAsset = split(data, "_")[3]
410- let owner = value(addressFromString(split(data, "_")[4]))
411- let all = if ((split(data, "_")[5] == "true"))
412- then true
413- else false
414- let password = split(data, "_")[6]
415- let spent = parseIntValue(split(data, "_")[7])
416- if ((owner != i.caller))
417- then throw("return should be called by order owner")
418- else {
419- let returnAmount = (amount - spent)
420- if ((0 >= returnAmount))
421- then throw("nothing to return")
422- else {
423- let orders = match getString(this, "orders") {
424- case s: String =>
425- s
426- case _: Unit =>
427- ""
428- case _ =>
429- throw()
430- }
431- let newData = (dropRight(data, size(split(data, "_")[7])) + toString(amount))
432- let index = value(indexOf(orders, orderId))
433- let newOrders = (take(orders, index) + drop(orders, (index + size(orderId))))
434- ScriptResult(WriteSet([DataEntry("orders", newOrders), DataEntry(orderId, newData)]), TransferSet([ScriptTransfer(i.caller, returnAmount, if ((amountAsset == "WAVES"))
435- then unit
436- else fromBase58String(amountAsset))]))
437- }
438- }
425+ let orderPassword = split(data, "_")[7]
426+ let orderSpent = parseIntValue(split(data, "_")[8])
427+ if ((orderType != "buy"))
428+ then throw("Invalid order type")
429+ else if ((orderOwner != i.caller))
430+ then throw("Return should be called by order owner")
431+ else {
432+ let returnAmount = (orderPriceAssetAmount - orderSpent)
433+ if ((0 >= returnAmount))
434+ then throw("nothing to return")
435+ else {
436+ let orders = match getString(this, "orders") {
437+ case s: String =>
438+ s
439+ case _: Unit =>
440+ ""
441+ case _ =>
442+ throw()
443+ }
444+ let newData = (dropRight(data, size(split(data, "_")[7])) + toString(orderPriceAssetAmount))
445+ let index = value(indexOf(orders, orderId))
446+ let newOrders = (take(orders, index) + drop(orders, (index + size(orderId))))
447+ ScriptResult(WriteSet([DataEntry("orders", newOrders), DataEntry(orderId, newData)]), TransferSet([ScriptTransfer(i.caller, returnAmount, if ((orderPriceAsset == "WAVES"))
448+ then unit
449+ else fromBase58String(orderPriceAsset))]))
450+ }
451+ }
439452 }
440453
441454

github/deemru/w8io/169f3d6 
87.97 ms