tx · DxfBpF9jCKfQwgefUtSbo1WFLSCdMZKF7Jb6sMQ5n894 3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar: -1.00000000 Waves 2020.05.25 20:06 [1014103] smart asset 3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar > SELF 0.00000000 MOITOKEN
{ "type": 15, "id": "DxfBpF9jCKfQwgefUtSbo1WFLSCdMZKF7Jb6sMQ5n894", "fee": 100000000, "feeAssetId": null, "timestamp": 1590426432403, "version": 1, "sender": "3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar", "senderPublicKey": "BUxg9XtvamV81CZCqrQzi8BxCizU41dpSqoqt5mW56XS", "proofs": [ "3tZPHtZrz4u5F7GqNtQ4WDpSd33chDKEVcvZ4NziDTKRJ5GVEE92kxr2kvuJR3MHuJk6WMsSJp3JtLhNyzC5SvUv" ], "assetId": "3tqknScoCegnWpFYGvYGiUM68iWC1Fw9KPgHdYgi8ZWc", "script": "base64:AQQAAAALZEFwcEFkZHJlc3MJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNNeWdRYXdHMmdQam9lajh3WDJjcWt4bWc3S1hBUFA2eGFyBAAAAAdhZG1pblBLAQAAACCbvoDDAKlv8SHnGnzbjcmS7cF3EYTHum5V5rS3JwBICQQAAAAFQlRDSWQBAAAAICZW18edbVw5IUDUbKCl7CbP+JI8377yHi104yBIibXVBAAAAAlzZWxsUHJpY2UAAAAAAAZCLEAEAAAACGJ1eVByaWNlAAAAAAAFqZXABAAAAAckbWF0Y2gwBQAAAAJ0eAMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0J1cm5UcmFuc2FjdGlvbgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAGVNldEFzc2V0U2NyaXB0VHJhbnNhY3Rpb24GCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAElJlaXNzdWVUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAJAAAAAAAAAggFAAAAAnR4AA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FcHJpY2UFAAAACXNlbGxQcmljZQYJAABmAAAAAgUAAAAIYnV5UHJpY2UICAUAAAABZQAAAAlzZWxsT3JkZXIAAAAFcHJpY2UJAAACAAAAAQIAAAAX0KbQtdC90LAg0L/RgNC+0LTQsNC20LgGAwUAAAADYnV5AwkAAGYAAAACBQAAAAhidXlQcmljZQgIBQAAAAFlAAAACXNlbGxPcmRlcgAAAAVwcmljZQkAAAIAAAABAgAAABfQptC10L3QsCDQv9C+0LrRg9C/0LrQuAYJAAACAAAAAQIAAAAWc29tZXRoaW5nIGJhZCBoYXBwZW5lZAcsXupd", "chainId": 84, "height": 1014103, "spentComplexity": 0 } View: original | compacted Prev: HAkkLEu7LH6TXyMy57bnpAJMw99RG4QdZkcpCQpXFfDu Next: G2k53RvCNmxZxCD7cuskuCDcCftwtgCFd1xPoLFsRmwo Diff:
Old | New | Differences | |
---|---|---|---|
20 | 20 | else if ((e.sellOrder.assetPair.priceAsset != BTCId)) | |
21 | 21 | then throw("торгуется только с парами BTC") | |
22 | 22 | else if (sell) | |
23 | - | then if ((e.sellOrder.price >= sellPrice)) | |
23 | + | then if (if ((e.sellOrder.price > sellPrice)) | |
24 | + | then true | |
25 | + | else (buyPrice > e.sellOrder.price)) | |
24 | 26 | then throw("Цена продажи") | |
25 | 27 | else true | |
26 | 28 | else if (buy) | |
27 | - | then if ((buyPrice | |
29 | + | then if ((buyPrice > e.sellOrder.price)) | |
28 | 30 | then throw("Цена покупки") | |
29 | 31 | else true | |
30 | 32 | else throw("something bad happened") |
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 BTCId = base58'3afJDTZVMvCdLB3rd1PEY6M7icZj1VkvwBiprVRbfD3a' | |
6 | 6 | let sellPrice = 105000000 | |
7 | 7 | let buyPrice = 95000000 | |
8 | 8 | match tx { | |
9 | 9 | case tx: BurnTransaction|SetAssetScriptTransaction|ReissueTransaction => | |
10 | 10 | (tx.sender == dAppAddress) | |
11 | 11 | case tx: TransferTransaction|MassTransferTransaction => | |
12 | 12 | true | |
13 | 13 | case e: ExchangeTransaction => | |
14 | 14 | let sender = e.sellOrder.sender | |
15 | 15 | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
16 | 16 | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
17 | 17 | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) | |
18 | 18 | if (admin) | |
19 | 19 | then true | |
20 | 20 | else if ((e.sellOrder.assetPair.priceAsset != BTCId)) | |
21 | 21 | then throw("торгуется только с парами BTC") | |
22 | 22 | else if (sell) | |
23 | - | then if ((e.sellOrder.price >= sellPrice)) | |
23 | + | then if (if ((e.sellOrder.price > sellPrice)) | |
24 | + | then true | |
25 | + | else (buyPrice > e.sellOrder.price)) | |
24 | 26 | then throw("Цена продажи") | |
25 | 27 | else true | |
26 | 28 | else if (buy) | |
27 | - | then if ((buyPrice | |
29 | + | then if ((buyPrice > e.sellOrder.price)) | |
28 | 30 | then throw("Цена покупки") | |
29 | 31 | else true | |
30 | 32 | else throw("something bad happened") | |
31 | 33 | case _ => | |
32 | 34 | false | |
33 | 35 | } |
github/deemru/w8io/169f3d6 27.71 ms ◑