tx · 43ZD4PsA1AoRi6ZTjCEnRYju4UWpUd7W6cSSMnskqsAN 3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar: -1.00000000 Waves 2020.05.27 16:22 [1016849] smart asset 3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar > SELF 0.00000000 MOITOKEN
{ "type": 15, "id": "43ZD4PsA1AoRi6ZTjCEnRYju4UWpUd7W6cSSMnskqsAN", "fee": 100000000, "feeAssetId": null, "timestamp": 1590585762212, "version": 1, "sender": "3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar", "senderPublicKey": "BUxg9XtvamV81CZCqrQzi8BxCizU41dpSqoqt5mW56XS", "proofs": [ "3eaPve5Hra7MM8CyAAm8LZtvZ2WJ9X3vrbaWziHhcedNnLLZ3jx5eVivHeVxoJL1bASrRiKsZi55PWWwVx7Dmgo5" ], "assetId": "3tqknScoCegnWpFYGvYGiUM68iWC1Fw9KPgHdYgi8ZWc", "script": "base64:AQQAAAALZEFwcEFkZHJlc3MJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNNeWdRYXdHMmdQam9lajh3WDJjcWt4bWc3S1hBUFA2eGFyBAAAAAdhZG1pblBLAQAAACCbvoDDAKlv8SHnGnzbjcmS7cF3EYTHum5V5rS3JwBICQQAAAALc3RhcnRIZWlnaHQAAAAAAAAPgMAEAAAADmludGVydmFsSGVpZ2h0AAAAAAAAAAXcBAAAAA1pbnRlcnZhbFByaWNlAAAAAAAAAAPoBAAAAApzdGFydFByaWNlAAAAAAAAAAPoBAAAAARkYXlzCQAAaQAAAAIJAABlAAAAAgUAAAAGaGVpZ2h0BQAAAAtzdGFydEhlaWdodAUAAAAOaW50ZXJ2YWxIZWlnaHQEAAAAA3N1bQkAAGQAAAACBQAAAApzdGFydFByaWNlCQAAaAAAAAIFAAAADWludGVydmFsUHJpY2UFAAAABGRheXMEAAAACXNlbGxQcmljZQUAAAADc3VtBAAAAAhidXlQcmljZQkAAGUAAAACBQAAAANzd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4WCUyZYUAH6CXi7p5idnQg5avPRWVDUGn Next: AoujyRNgyyDBWkLRG75QR87qaFMfiRWQkCxutSCugkTH Diff:
Old | New | Differences | |
---|---|---|---|
24 | 24 | case tx: TransferTransaction => | |
25 | 25 | true | |
26 | 26 | case e: ExchangeTransaction => | |
27 | - | let sender = e.sellOrder.sender | |
28 | 27 | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
29 | 28 | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
30 | 29 | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) | |
31 | 30 | if (admin) | |
32 | 31 | then true | |
33 | 32 | else if (isDefined(e.sellOrder.assetPair.priceAsset)) | |
34 | - | then throw("Only Waves accepted") | |
33 | + | then throw(" Only Waves accepted ") | |
35 | 34 | else if (sell) | |
36 | - | then if ((sellPrice > | |
37 | - | then throw(((" | |
35 | + | then if ((sellPrice > e.sellOrder.price)) | |
36 | + | then throw(((" Selling price should be higher " + toString(sellPricee)) + " Wavelets ")) | |
38 | 37 | else if (((e.sellOrder.expiration - e.sellOrder.timestamp) >= 6000000)) | |
39 | - | then throw(" | |
38 | + | then throw(" The term of the order should not exceed 1 hour ") | |
40 | 39 | else true | |
41 | 40 | else if (buy) | |
42 | - | then if ((buyPrice > | |
43 | - | then throw(((" | |
41 | + | then if ((buyPrice > e.sellOrder.price)) | |
42 | + | then throw(((" Purchase price must be higher " + toString(buyPricee)) + " Wavelets ")) | |
44 | 43 | else true | |
45 | - | else throw("Something bad happened") | |
44 | + | else throw(" Something bad happened ") | |
46 | 45 | case _ => | |
47 | 46 | false | |
48 | 47 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 1 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let dAppAddress = addressFromString("3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar") | |
4 | 4 | let adminPK = base58'BUxg9XtvamV81CZCqrQzi8BxCizU41dpSqoqt5mW56XS' | |
5 | 5 | let startHeight = 1016000 | |
6 | 6 | let intervalHeight = 1500 | |
7 | 7 | let intervalPrice = 1000 | |
8 | 8 | let startPrice = 1000 | |
9 | 9 | let days = ((height - startHeight) / intervalHeight) | |
10 | 10 | let sum = (startPrice + (intervalPrice * days)) | |
11 | 11 | let sellPrice = sum | |
12 | 12 | let buyPrice = (sum - 500) | |
13 | 13 | let sellPricee = sellPrice | |
14 | 14 | let buyPricee = buyPrice | |
15 | 15 | match tx { | |
16 | 16 | case tx: BurnTransaction => | |
17 | 17 | true | |
18 | 18 | case tx: ReissueTransaction => | |
19 | 19 | (tx.sender == dAppAddress) | |
20 | 20 | case tx: SetAssetScriptTransaction => | |
21 | 21 | (tx.sender == dAppAddress) | |
22 | 22 | case tx: MassTransferTransaction => | |
23 | 23 | true | |
24 | 24 | case tx: TransferTransaction => | |
25 | 25 | true | |
26 | 26 | case e: ExchangeTransaction => | |
27 | - | let sender = e.sellOrder.sender | |
28 | 27 | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
29 | 28 | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
30 | 29 | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) | |
31 | 30 | if (admin) | |
32 | 31 | then true | |
33 | 32 | else if (isDefined(e.sellOrder.assetPair.priceAsset)) | |
34 | - | then throw("Only Waves accepted") | |
33 | + | then throw(" Only Waves accepted ") | |
35 | 34 | else if (sell) | |
36 | - | then if ((sellPrice > | |
37 | - | then throw(((" | |
35 | + | then if ((sellPrice > e.sellOrder.price)) | |
36 | + | then throw(((" Selling price should be higher " + toString(sellPricee)) + " Wavelets ")) | |
38 | 37 | else if (((e.sellOrder.expiration - e.sellOrder.timestamp) >= 6000000)) | |
39 | - | then throw(" | |
38 | + | then throw(" The term of the order should not exceed 1 hour ") | |
40 | 39 | else true | |
41 | 40 | else if (buy) | |
42 | - | then if ((buyPrice > | |
43 | - | then throw(((" | |
41 | + | then if ((buyPrice > e.sellOrder.price)) | |
42 | + | then throw(((" Purchase price must be higher " + toString(buyPricee)) + " Wavelets ")) | |
44 | 43 | else true | |
45 | - | else throw("Something bad happened") | |
44 | + | else throw(" Something bad happened ") | |
46 | 45 | case _ => | |
47 | 46 | false | |
48 | 47 | } |
github/deemru/w8io/169f3d6 98.88 ms ◑