tx · cwicYTbkzVfr7oES9tmSEiU9UtzgPifL9YyNLBfywmj 3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar: -1.00000000 Waves 2020.05.29 01:40 [1018822] smart asset 3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar > SELF 0.00000000 MOITOKEN
{ "type": 15, "id": "cwicYTbkzVfr7oES9tmSEiU9UtzgPifL9YyNLBfywmj", "fee": 100000000, "feeAssetId": null, "timestamp": 1590705635182, "version": 1, "sender": "3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar", "senderPublicKey": "BUxg9XtvamV81CZCqrQzi8BxCizU41dpSqoqt5mW56XS", "proofs": [ "2673GuGZa5V2AY5wFnSH5Xo2Mv2BAcKKvA8Efh6SgSoXPF1T47Mthp8oeVmqAQZykCqxNYUt4fAHnXmHZvyDrsiL" ], "assetId": "3tqknScoCegnWpFYGvYGiUM68iWC1Fw9KPgHdYgi8ZWc", "script": "base64:AQQAAAALZEFwcEFkZHJlc3MJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNNeWdRYXdHMmdQam9lajh3WDJjcWt4bWc3S1hBUFA2eGFyBAAAAAdhZG1pblBLAQAAACCbvoDDAKlv8SHnGnzbjcmS7cF3EYTHum5V5rS3JwBICQQAAAAEVVNEVAEAAAAgQgOoh2J3l4MtPENb6Z+x/IVXhnG5IKTf37Twf68JKQwEAAAACXNlbGxQcmljZQAAAAAAABAFkAQAAAAIYnV5UHJpY2UAAAAAAAAOfvAEAAAAByRtYXRjaDAFAAAAAnR4AwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPQnVyblRyYW5zYWN0aW9uBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAZU2V0QXNzZXRTY3JpcHRUcmFuc2FjdGlvbgYJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAASUmVpc3N1ZVRyYW5zYWN0aW9uBAAAAAJ0eAUAAAAHJG1hdGNoMAkAAAAAAAACCAUAAAACdHgAAA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WdyYW0gY2hhbm5lbCBAQURLQVJfV0FWRVMDBQAAAARzZWxsAwMJAABmAAAAAggIBQAAAAFlAAAACXNlbGxPcmRlcgAAAAVwcmljZQUAAAAJc2VsbFByaWNlBgkAAGYAAAACBQAAAAhidXlQcmljZQgIBQAAAAFlAAAACXNlbGxPcmRlcgAAAAVwcmljZQkAAAIAAAABAgAAAKtUcmFkaW5nIHJhbmdlIDAuOTUgLSAxLjA1IEJUQy4gRG8gbm90IHdyaXRlIG9mZiB0aGUgc2FsZSwgaW4gdGhlIGZ1dHVyZSB0b2tlbnMgd2lsbCBiZSBhZGRlZCBmb3IgdHJhZGluZyBpbiB0YW5kZW0gd2l0aCBBREtBUi4gRGV0YWlscyBpbiB0aGUgdGVsZWdyYW0gY2hhbm5lbCBAQURLQVJfV0FWRVMGAwUAAAADYnV5AwkAAGYAAAACBQAAAAhidXlQcmljZQgIBQAAAAFlAAAACXNlbGxPcmRlcgAAAAVwcmljZQkAAAIAAAABAgAAAPJUaGUgdHJhZGluZyByYW5nZSBpcyAwLjk1IC0gMS4wNSBCVEMsIHdoZXJlIDAuOTUgaXMgdGhlIG1pbmltdW0gcHVyY2hhc2UgcHJpY2UsIHdoaWxlIHNlbGxpbmcgYXQgdGhlIHByaWNlIG9mIDAuNSBCVEMsIHlvdSBhbHNvIG5lZWQgdG8gc2V0IHRoZSBwcmljZSB0byAwLjk1IEJUQywgb3RoZXJ3aXNlIHRoZSBvcmRlciB3aWxsIG5vdCB3b3JrLiBEZXRhaWxzIGluIHRoZSB0ZWxlZ3JhbSBjaGFubmVsIEBBREtBUl9XQVZFUwYJAAACAAAAAQIAAAAWU29tZXRoaW5nIGJhZCBoYXBwZW5lZAd3hxHF", "chainId": 84, "height": 1018822, "spentComplexity": 0 } View: original | compacted Prev: H1U3CBEy4y6YBg9N3cwN4XkLWwKLkgQ5mhvCuWq2FMD4 Next: 4v2boztKT9RnJ8m9yfgDf3QCqF3tcEc9is5HMHY7Q6z3 Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | let dAppAddress = addressFromString("3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar") | |
4 | 4 | let adminPK = base58'BUxg9XtvamV81CZCqrQzi8BxCizU41dpSqoqt5mW56XS' | |
5 | 5 | let USDT = base58'5Sh9KghfkZyhjwuodovDhB6PghDUGBHiAPZ4MkrPgKtX' | |
6 | - | let USDN = base58'3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC' | |
7 | 6 | let sellPrice = 1050000 | |
8 | 7 | let buyPrice = 950000 | |
9 | 8 | match tx { | |
31 | 30 | then if ((buyPrice > e.sellOrder.price)) | |
32 | 31 | 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 @ADKAR_WAVES") | |
33 | 32 | else true | |
34 | - | else if (if ((e.sellOrder.assetPair.priceAsset != USDN)) | |
35 | - | then true | |
36 | - | else (e.sellOrder.assetPair.amountAsset != USDN)) | |
37 | - | then throw("2222 is being traded in a pair: ADKAR/BTC. Details in the telegram channel @ADKAR_WAVES") | |
38 | - | else if (sell) | |
39 | - | then if (if ((e.sellOrder.price > sellPrice)) | |
40 | - | then true | |
41 | - | else (buyPrice > e.sellOrder.price)) | |
42 | - | 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 ADKAR. Details in the telegram channel @ADKAR_WAVES") | |
43 | - | else true | |
44 | - | else if (buy) | |
45 | - | then if ((buyPrice > e.sellOrder.price)) | |
46 | - | 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 @ADKAR_WAVES") | |
47 | - | else true | |
48 | - | else throw("Something bad happened") | |
33 | + | else throw("Something bad happened") | |
49 | 34 | case _ => | |
50 | 35 | false | |
51 | 36 | } |
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 USDT = base58'5Sh9KghfkZyhjwuodovDhB6PghDUGBHiAPZ4MkrPgKtX' | |
6 | - | let USDN = base58'3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC' | |
7 | 6 | let sellPrice = 1050000 | |
8 | 7 | let buyPrice = 950000 | |
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 | 14 | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
16 | 15 | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
17 | 16 | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) | |
18 | 17 | if (admin) | |
19 | 18 | then true | |
20 | 19 | else if (if ((e.sellOrder.assetPair.priceAsset != USDT)) | |
21 | 20 | then true | |
22 | 21 | else (e.sellOrder.assetPair.amountAsset != USDT)) | |
23 | 22 | then throw("1111 is being traded in a pair: ADKAR/BTC. Details in the telegram channel @ADKAR_WAVES") | |
24 | 23 | else if (sell) | |
25 | 24 | then if (if ((e.sellOrder.price > sellPrice)) | |
26 | 25 | then true | |
27 | 26 | else (buyPrice > e.sellOrder.price)) | |
28 | 27 | 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 ADKAR. Details in the telegram channel @ADKAR_WAVES") | |
29 | 28 | else true | |
30 | 29 | else if (buy) | |
31 | 30 | then if ((buyPrice > e.sellOrder.price)) | |
32 | 31 | 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 @ADKAR_WAVES") | |
33 | 32 | else true | |
34 | - | else if (if ((e.sellOrder.assetPair.priceAsset != USDN)) | |
35 | - | then true | |
36 | - | else (e.sellOrder.assetPair.amountAsset != USDN)) | |
37 | - | then throw("2222 is being traded in a pair: ADKAR/BTC. Details in the telegram channel @ADKAR_WAVES") | |
38 | - | else if (sell) | |
39 | - | then if (if ((e.sellOrder.price > sellPrice)) | |
40 | - | then true | |
41 | - | else (buyPrice > e.sellOrder.price)) | |
42 | - | 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 ADKAR. Details in the telegram channel @ADKAR_WAVES") | |
43 | - | else true | |
44 | - | else if (buy) | |
45 | - | then if ((buyPrice > e.sellOrder.price)) | |
46 | - | 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 @ADKAR_WAVES") | |
47 | - | else true | |
48 | - | else throw("Something bad happened") | |
33 | + | else throw("Something bad happened") | |
49 | 34 | case _ => | |
50 | 35 | false | |
51 | 36 | } |
github/deemru/w8io/169f3d6 32.70 ms ◑