tx · E2pCbwiU3UkAWcvAxUeGL99g76XuPdJo3F1NB8y9kSG 3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar: -1.00000000 Waves 2020.05.25 18:50 [1014033] smart asset 3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar > SELF 0.00000000 MOITOKEN
{ "type": 15, "id": "E2pCbwiU3UkAWcvAxUeGL99g76XuPdJo3F1NB8y9kSG", "fee": 100000000, "feeAssetId": null, "timestamp": 1590421837018, "version": 1, "sender": "3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar", "senderPublicKey": "BUxg9XtvamV81CZCqrQzi8BxCizU41dpSqoqt5mW56XS", "proofs": [ "54RwBhzp7BnNZP31miJnwRtmwCGDMq4KVYSvzemy1NTqpnm2QtNNKAxAFYpY1f9nu9q8S3rfVVoq4veqJJcG5pZ2" ], "assetId": "3tqknScoCegnWpFYGvYGiUM68iWC1Fw9KPgHdYgi8ZWc", "script": "base64:AQQAAAALZEFwcEFkZHJlc3MJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNNeWdRYXdHMmdQam9lajh3WDJjcWt4bWc3S1hBUFA2eGFyBAAAAAdhZG1pblBLAQAAACCbvoDDAKlv8SHnGnzbjcmS7cF3EYTHum5V5rS3JwBICQQAAAAFQlRDSWQBAAAAICZW18edbVw5IUDUbKCl7CbP+JI8377yHi104yBIibXVBAAAAAlzZWxsUHJpY2UJAABpAAAAAgAAAAAABkIsQAAAAAAABfXhAAQAAAAIYnV5UHJpY2UJAABpAAAAAgAAAAAABamVwAAAAAAABfXhAAQAAAAHJG1hdGNoMAUAAAACdHgDAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9CdXJuVHJhbnNhY3Rpb24GAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABlTZXRBc3NldFNjcmlwdFRyYW5zYWN0aW9uBgkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABJSZWlzc3VlVHJhbnNhY3Rpb24EAAAAAnR4BQA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GwDAwkAAGYAAAACBQAAAAlzZWxsUHJpY2UICAUAAAABZQAAAAlzZWxsT3JkZXIAAAAFcHJpY2UGCQAAZgAAAAIFAAAACGJ1eVByaWNlCAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAABXByaWNlCQAAAgAAAAECAAAAF9Cm0LXQvdCwINC/0YDQvtC00LDQttC4BgMFAAAAA2J1eQMDCQAAZgAAAAIICAUAAAABZQAAAAlzZWxsT3JkZXIAAAAFcHJpY2UFAAAACGJ1eVByaWNlBgkAAGYAAAACBQAAAAlzZWxsUHJpY2UICAUAAAABZQAAAAlzZWxsT3JkZXIAAAAFcHJpY2UJAAACAAAAAQIAAAAX0KbQtdC90LAg0L/QvtC60YPQv9C60LgGCQAAAgAAAAECAAAAFnNvbWV0aGluZyBiYWQgaGFwcGVuZWQHcOWmXA==", "chainId": 84, "height": 1014033, "spentComplexity": 0 } View: original | compacted Prev: 73HGdkvjBprNtKDzj6Qoi3WwK6RXwdRXARajBUCtBLce Next: BVYuUshzk8eAG4XViKf2bYQggYVNEBNjWCftKosV6Lde 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 ((sellPrice > e.sellOrder.price)) | |
23 | + | then if (if ((sellPrice > e.sellOrder.price)) | |
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 ((e.sellOrder.price > buyPrice)) | |
29 | + | then if (if ((e.sellOrder.price > buyPrice)) | |
30 | + | then true | |
31 | + | else (sellPrice > e.sellOrder.price)) | |
28 | 32 | then throw("Цена покупки") | |
29 | 33 | else true | |
30 | 34 | 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 / 100000000) | |
7 | 7 | let buyPrice = (95000000 / 100000000) | |
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 ((sellPrice > e.sellOrder.price)) | |
23 | + | then if (if ((sellPrice > e.sellOrder.price)) | |
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 ((e.sellOrder.price > buyPrice)) | |
29 | + | then if (if ((e.sellOrder.price > buyPrice)) | |
30 | + | then true | |
31 | + | else (sellPrice > e.sellOrder.price)) | |
28 | 32 | then throw("Цена покупки") | |
29 | 33 | else true | |
30 | 34 | else throw("something bad happened") | |
31 | 35 | case _ => | |
32 | 36 | false | |
33 | 37 | } |
github/deemru/w8io/169f3d6 35.22 ms ◑