tx · Awqp5uxuQLPJjj94AdXRgdMiV2GjVvtyCsWG4xwq11eD
3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar: -1.00000000 Waves
2020.05.29 01:21 [1018805] smart asset 3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar > SELF 0.00000000 MOITOKEN
{
"type": 15,
"id": "Awqp5uxuQLPJjj94AdXRgdMiV2GjVvtyCsWG4xwq11eD",
"fee": 100000000,
"feeAssetId": null,
"timestamp": 1590704553198,
"version": 1,
"sender": "3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar",
"senderPublicKey": "BUxg9XtvamV81CZCqrQzi8BxCizU41dpSqoqt5mW56XS",
"proofs": [
"WSHxHFCmD9mQDj3XcJ6fJvunwoYav2ZVk7g37wN6R9AHpHecMuYssoms4ShSxdn53SumzQarnCEQJg44qLQng8X"
],
"assetId": "3tqknScoCegnWpFYGvYGiUM68iWC1Fw9KPgHdYgi8ZWc",
"script": "base64:AQQAAAALZEFwcEFkZHJlc3MJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNNeWdRYXdHMmdQam9lajh3WDJjcWt4bWc3S1hBUFA2eGFyBAAAAAdhZG1pblBLAQAAACCbvoDDAKlv8SHnGnzbjcmS7cF3EYTHum5V5rS3JwBICQQAAAAEVVNEVAEAAAAgQgOoh2J3l4MtPENb6Z+x/IVXhnG5IKTf37Twf68JKQwEAAAABFVTRE4BAAAAICJkPx6+YEbpEWoTE9ymM/4Wfgf5d+mz8hX8mUkqMAo3BAAAAAlzZWxsUHJpY2UAAAAAAAAQBZAEAAAACGJ1eVByaWNlAAAAAAAADn7wBAAAAAckbWF0Y2gwBQAAAAJ0eAMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0J1cm5UcmFuc2FjdGlvbgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAGVNldEFzc2V0U2NyaXB0VHJhbnNhY3Rpb24GCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAElJlaXN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YAAAACCAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAABXByaWNlBQAAAAlzZWxsUHJpY2UGCQAAZgAAAAIFAAAACGJ1eVByaWNlCAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAABXByaWNlCQAAAgAAAAECAAAAq1RyYWRpbmcgcmFuZ2UgMC45NSAtIDEuMDUgQlRDLiBEbyBub3Qgd3JpdGUgb2ZmIHRoZSBzYWxlLCBpbiB0aGUgZnV0dXJlIHRva2VucyB3aWxsIGJlIGFkZGVkIGZvciB0cmFkaW5nIGluIHRhbmRlbSB3aXRoIEFES0FSLiBEZXRhaWxzIGluIHRoZSB0ZWxlZ3JhbSBjaGFubmVsIEBBREtBUl9XQVZFUwYDBQAAAANidXkDCQAAZgAAAAIFAAAACGJ1eVByaWNlCAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAABXByaWNlCQAAAgAAAAECAAAA8lRoZSB0cmFkaW5nIHJhbmdlIGlzIDAuOTUgLSAxLjA1IEJUQywgd2hlcmUgMC45NSBpcyB0aGUgbWluaW11bSBwdXJjaGFzZSBwcmljZSwgd2hpbGUgc2VsbGluZyBhdCB0aGUgcHJpY2Ugb2YgMC41IEJUQywgeW91IGFsc28gbmVlZCB0byBzZXQgdGhlIHByaWNlIHRvIDAuOTUgQlRDLCBvdGhlcndpc2UgdGhlIG9yZGVyIHdpbGwgbm90IHdvcmsuIERldGFpbHMgaW4gdGhlIHRlbGVncmFtIGNoYW5uZWwgQEFES0FSX1dBVkVTBgkAAAIAAAABAgAAABZTb21ldGhpbmcgYmFkIGhhcHBlbmVkBy5/dFo=",
"chainId": 84,
"height": 1018805,
"spentComplexity": 0
}
View: original | compacted
Prev: 12Mu4QRweaP1uxqKhhnBVCP6AGQVdUV1Npd67J7Xj77g
Next: HAB8WpMz9YrQAq5J8bywPvvBEj3EdpciwnNbVdoduk1j
Diff:
Old | New | | Differences |
---|
17 | 17 | | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) |
---|
18 | 18 | | if (admin) |
---|
19 | 19 | | then true |
---|
20 | | - | else if (if ((e.sellOrder.assetPair.priceAsset != USDT)) |
---|
21 | | - | then true |
---|
22 | | - | else (e.sellOrder.assetPair.priceAsset != USDN)) |
---|
| 20 | + | else if ((e.sellOrder.assetPair.priceAsset != USDT)) |
---|
23 | 21 | | then throw("ADKAR is being traded in a pair: ADKAR/BTC. Details in the telegram channel @ADKAR_WAVES") |
---|
24 | 22 | | else if (sell) |
---|
25 | 23 | | then if (if ((e.sellOrder.price > sellPrice)) |
---|
|
31 | 29 | | then if ((buyPrice > e.sellOrder.price)) |
---|
32 | 30 | | 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 | 31 | | else true |
---|
34 | | - | else throw("Something bad happened") |
---|
| 32 | + | else if ((e.sellOrder.assetPair.priceAsset != USDN)) |
---|
| 33 | + | then throw("ADKAR is being traded in a pair: ADKAR/BTC. Details in the telegram channel @ADKAR_WAVES") |
---|
| 34 | + | else if (sell) |
---|
| 35 | + | then if (if ((e.sellOrder.price > sellPrice)) |
---|
| 36 | + | then true |
---|
| 37 | + | else (buyPrice > e.sellOrder.price)) |
---|
| 38 | + | 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") |
---|
| 39 | + | else true |
---|
| 40 | + | else if (buy) |
---|
| 41 | + | then if ((buyPrice > e.sellOrder.price)) |
---|
| 42 | + | 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") |
---|
| 43 | + | else true |
---|
| 44 | + | else throw("Something bad happened") |
---|
35 | 45 | | case _ => |
---|
36 | 46 | | false |
---|
37 | 47 | | } |
---|
Full:
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 | 6 | | let USDN = base58'3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC' |
---|
7 | 7 | | let sellPrice = 1050000 |
---|
8 | 8 | | let buyPrice = 950000 |
---|
9 | 9 | | match tx { |
---|
10 | 10 | | case tx: BurnTransaction|SetAssetScriptTransaction|ReissueTransaction => |
---|
11 | 11 | | (tx.sender == dAppAddress) |
---|
12 | 12 | | case tx: TransferTransaction|MassTransferTransaction => |
---|
13 | 13 | | true |
---|
14 | 14 | | case e: ExchangeTransaction => |
---|
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 | | - | else if (if ((e.sellOrder.assetPair.priceAsset != USDT)) |
---|
21 | | - | then true |
---|
22 | | - | else (e.sellOrder.assetPair.priceAsset != USDN)) |
---|
| 20 | + | else if ((e.sellOrder.assetPair.priceAsset != USDT)) |
---|
23 | 21 | | then throw("ADKAR is being traded in a pair: ADKAR/BTC. Details in the telegram channel @ADKAR_WAVES") |
---|
24 | 22 | | else if (sell) |
---|
25 | 23 | | then if (if ((e.sellOrder.price > sellPrice)) |
---|
26 | 24 | | then true |
---|
27 | 25 | | else (buyPrice > e.sellOrder.price)) |
---|
28 | 26 | | 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 | 27 | | else true |
---|
30 | 28 | | else if (buy) |
---|
31 | 29 | | then if ((buyPrice > e.sellOrder.price)) |
---|
32 | 30 | | 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 | 31 | | else true |
---|
34 | | - | else throw("Something bad happened") |
---|
| 32 | + | else if ((e.sellOrder.assetPair.priceAsset != USDN)) |
---|
| 33 | + | then throw("ADKAR is being traded in a pair: ADKAR/BTC. Details in the telegram channel @ADKAR_WAVES") |
---|
| 34 | + | else if (sell) |
---|
| 35 | + | then if (if ((e.sellOrder.price > sellPrice)) |
---|
| 36 | + | then true |
---|
| 37 | + | else (buyPrice > e.sellOrder.price)) |
---|
| 38 | + | 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") |
---|
| 39 | + | else true |
---|
| 40 | + | else if (buy) |
---|
| 41 | + | then if ((buyPrice > e.sellOrder.price)) |
---|
| 42 | + | 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") |
---|
| 43 | + | else true |
---|
| 44 | + | else throw("Something bad happened") |
---|
35 | 45 | | case _ => |
---|
36 | 46 | | false |
---|
37 | 47 | | } |
---|