tx · 6baqspcCiBkeAZw97PQhN3dALpEfcz979Kg6pPfQVctD 3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar: -1.00000000 Waves 2020.05.26 10:42 [1014994] smart asset 3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar > SELF 0.00000000 MOITOKEN
{ "type": 15, "id": "6baqspcCiBkeAZw97PQhN3dALpEfcz979Kg6pPfQVctD", "fee": 100000000, "feeAssetId": null, "timestamp": 1590478944600, "version": 1, "sender": "3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar", "senderPublicKey": "BUxg9XtvamV81CZCqrQzi8BxCizU41dpSqoqt5mW56XS", "proofs": [ "2kzWW3R73UQmfJoyEtKaeQApz1kYnwiMffUjSvwLt4Yv7LYFuvrACTbfXdj3GMo71oUbjJEeNGqit98AQXYic2xA" ], "assetId": "3tqknScoCegnWpFYGvYGiUM68iWC1Fw9KPgHdYgi8ZWc", "script": "base64:AQQAAAALZEFwcEFkZHJlc3MJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNNeWdRYXdHMmdQam9lajh3WDJjcWt4bWc3S1hBUFA2eGFyBAAAAAdhZG1pblBLAQAAACCbvoDDAKlv8SHnGnzbjcmS7cF3EYTHum5V5rS3JwBICQQAAAAFQlRDSWQBAAAAICZW18edbVw5IUDUbKCl7CbP+JI8377yHi104yBIibXVBAAAAAlzZWxsUHJpY2UAAAAAAAZCLEAEAAAACGJ1eVByaWNlAAAAAAAFqZXABAAAAAckbWF0Y2gwBQAAAAJ0eAMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0J1cm5UcmFuc2FjdGlvbgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAGVNldEFzc2V0U2NyaXB0VHJhbnNhY3Rpb24GCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAElJlaXNzdWVUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAJAAAAAAAAAggFAAAAAnR4AAAABnNlbmRlcgUAAA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sUHJpY2UGCQAAZgAAAAIFAAAACGJ1eVByaWNlCAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAABXByaWNlCQAAAgAAAAECAAAArVRyYWRpbmcgcmFuZ2UgMC45NSAtIDEuMDUgQlRDLiBEbyBub3Qgd3JpdGUgb2ZmIHRoZSBzYWxlLCBpbiB0aGUgZnV0dXJlIHRva2VucyB3aWxsIGJlIGFkZGVkIGZvciB0cmFkaW5nIGluIHRhbmRlbSB3aXRoIFVOUkVBTC4gRGV0YWlscyBpbiB0aGUgdGVsZWdyYW0gY2hhbm5lbCBAVU5SRUFMX1dBVkVTBgMFAAAAA2J1eQMJAABmAAAAAgUAAAAIYnV5UHJpY2UICAUAAAABZQAAAAlzZWxsT3JkZXIAAAAFcHJpY2UJAAACAAAAAQIAAADzVGhlIHRyYWRpbmcgcmFuZ2UgaXMgMC45NSAtIDEuMDUgQlRDLCB3aGVyZSAwLjk1IGlzIHRoZSBtaW5pbXVtIHB1cmNoYXNlIHByaWNlLCB3aGlsZSBzZWxsaW5nIGF0IHRoZSBwcmljZSBvZiAwLjUgQlRDLCB5b3UgYWxzbyBuZWVkIHRvIHNldCB0aGUgcHJpY2UgdG8gMC45NSBCVEMsIG90aGVyd2lzZSB0aGUgb3JkZXIgd2lsbCBub3Qgd29yay4gRGV0YWlscyBpbiB0aGUgdGVsZWdyYW0gY2hhbm5lbCBAVU5SRUFMX1dBVkVTBgkAAAIAAAABAgAAABZTb21ldGhpbmcgYmFkIGhhcHBlbmVkB/Ju7Cc=", "chainId": 84, "height": 1014994, "spentComplexity": 0 } View: original | compacted Prev: CFNawDKRChy8Fs91eRWgfr6G29tyv2R4Y46zB8rSJREk Next: 8CDzaLU9CxbooxYVxMdoxWaMKEXqSHzdc5fdPPSJ6qu5 Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | let dAppAddress = addressFromString("3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar") | |
4 | 4 | let adminPK = base58'BUxg9XtvamV81CZCqrQzi8BxCizU41dpSqoqt5mW56XS' | |
5 | 5 | let BTCId = base58'3afJDTZVMvCdLB3rd1PEY6M7icZj1VkvwBiprVRbfD3a' | |
6 | - | let USDId = base58'88922xdkSYjAPeqSGp6K22Tmkr43DGBZbbPDLK1sT6U8' | |
7 | 6 | let sellPrice = 105000000 | |
8 | 7 | let buyPrice = 95000000 | |
9 | 8 | match tx { | |
12 | 11 | case tx: TransferTransaction|MassTransferTransaction => | |
13 | 12 | true | |
14 | 13 | case e: ExchangeTransaction => | |
15 | - | if (if ((e.sellOrder.assetPair.priceAsset == USDId)) | |
14 | + | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
15 | + | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
16 | + | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) | |
17 | + | if (admin) | |
16 | 18 | then true | |
17 | - | else (e.sellOrder.assetPair.amountAsset == USDId)) | |
18 | - | then true | |
19 | - | else { | |
20 | - | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
21 | - | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
22 | - | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) | |
23 | - | if (admin) | |
24 | - | then true | |
25 | - | else if ((e.sellOrder.assetPair.priceAsset != BTCId)) | |
26 | - | then throw("UNREAL is being traded in a pair: UNREAL/BTC. Details in the telegram channel @UNREAL_WAVES") | |
27 | - | else if (sell) | |
28 | - | then if (if ((e.sellOrder.price > sellPrice)) | |
29 | - | then true | |
30 | - | else (buyPrice > e.sellOrder.price)) | |
31 | - | then throw("Trading range 0.95 - 1.05 BTC. Do not write off the sale, in the future tokens will be added for trading in tandem with UNREAL. Details in the telegram channel @UNREAL_WAVES") | |
32 | - | else true | |
33 | - | else if (buy) | |
34 | - | then if ((buyPrice > e.sellOrder.price)) | |
35 | - | then throw("The trading range is 0.95 - 1.05 BTC, where 0.95 is the minimum purchase price, while selling at the price of 0.5 BTC, you also need to set the price to 0.95 BTC, otherwise the order will not work. Details in the telegram channel @UNREAL_WAVES") | |
36 | - | else true | |
37 | - | else throw("something bad happened") | |
38 | - | } | |
19 | + | else if ((e.sellOrder.assetPair.priceAsset != BTCId)) | |
20 | + | then throw("UNREAL is being traded in a pair: UNREAL/BTC. Details in the telegram channel @UNREAL_WAVES") | |
21 | + | else if (sell) | |
22 | + | then if (if ((e.sellOrder.price > sellPrice)) | |
23 | + | then true | |
24 | + | else (buyPrice > e.sellOrder.price)) | |
25 | + | then throw("Trading range 0.95 - 1.05 BTC. Do not write off the sale, in the future tokens will be added for trading in tandem with UNREAL. Details in the telegram channel @UNREAL_WAVES") | |
26 | + | else true | |
27 | + | else if (buy) | |
28 | + | then if ((buyPrice > e.sellOrder.price)) | |
29 | + | then throw("The trading range is 0.95 - 1.05 BTC, where 0.95 is the minimum purchase price, while selling at the price of 0.5 BTC, you also need to set the price to 0.95 BTC, otherwise the order will not work. Details in the telegram channel @UNREAL_WAVES") | |
30 | + | else true | |
31 | + | else throw("Something bad happened") | |
39 | 32 | case _ => | |
40 | 33 | false | |
41 | 34 | } |
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 | - | let USDId = base58'88922xdkSYjAPeqSGp6K22Tmkr43DGBZbbPDLK1sT6U8' | |
7 | 6 | let sellPrice = 105000000 | |
8 | 7 | let buyPrice = 95000000 | |
9 | 8 | match tx { | |
10 | 9 | case tx: BurnTransaction|SetAssetScriptTransaction|ReissueTransaction => | |
11 | 10 | (tx.sender == dAppAddress) | |
12 | 11 | case tx: TransferTransaction|MassTransferTransaction => | |
13 | 12 | true | |
14 | 13 | case e: ExchangeTransaction => | |
15 | - | if (if ((e.sellOrder.assetPair.priceAsset == USDId)) | |
14 | + | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
15 | + | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
16 | + | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) | |
17 | + | if (admin) | |
16 | 18 | then true | |
17 | - | else (e.sellOrder.assetPair.amountAsset == USDId)) | |
18 | - | then true | |
19 | - | else { | |
20 | - | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
21 | - | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
22 | - | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) | |
23 | - | if (admin) | |
24 | - | then true | |
25 | - | else if ((e.sellOrder.assetPair.priceAsset != BTCId)) | |
26 | - | then throw("UNREAL is being traded in a pair: UNREAL/BTC. Details in the telegram channel @UNREAL_WAVES") | |
27 | - | else if (sell) | |
28 | - | then if (if ((e.sellOrder.price > sellPrice)) | |
29 | - | then true | |
30 | - | else (buyPrice > e.sellOrder.price)) | |
31 | - | then throw("Trading range 0.95 - 1.05 BTC. Do not write off the sale, in the future tokens will be added for trading in tandem with UNREAL. Details in the telegram channel @UNREAL_WAVES") | |
32 | - | else true | |
33 | - | else if (buy) | |
34 | - | then if ((buyPrice > e.sellOrder.price)) | |
35 | - | then throw("The trading range is 0.95 - 1.05 BTC, where 0.95 is the minimum purchase price, while selling at the price of 0.5 BTC, you also need to set the price to 0.95 BTC, otherwise the order will not work. Details in the telegram channel @UNREAL_WAVES") | |
36 | - | else true | |
37 | - | else throw("something bad happened") | |
38 | - | } | |
19 | + | else if ((e.sellOrder.assetPair.priceAsset != BTCId)) | |
20 | + | then throw("UNREAL is being traded in a pair: UNREAL/BTC. Details in the telegram channel @UNREAL_WAVES") | |
21 | + | else if (sell) | |
22 | + | then if (if ((e.sellOrder.price > sellPrice)) | |
23 | + | then true | |
24 | + | else (buyPrice > e.sellOrder.price)) | |
25 | + | then throw("Trading range 0.95 - 1.05 BTC. Do not write off the sale, in the future tokens will be added for trading in tandem with UNREAL. Details in the telegram channel @UNREAL_WAVES") | |
26 | + | else true | |
27 | + | else if (buy) | |
28 | + | then if ((buyPrice > e.sellOrder.price)) | |
29 | + | then throw("The trading range is 0.95 - 1.05 BTC, where 0.95 is the minimum purchase price, while selling at the price of 0.5 BTC, you also need to set the price to 0.95 BTC, otherwise the order will not work. Details in the telegram channel @UNREAL_WAVES") | |
30 | + | else true | |
31 | + | else throw("Something bad happened") | |
39 | 32 | case _ => | |
40 | 33 | false | |
41 | 34 | } |
github/deemru/w8io/169f3d6 59.28 ms ◑