tx · H1U3CBEy4y6YBg9N3cwN4XkLWwKLkgQ5mhvCuWq2FMD4
3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar: -1.00000000 Waves
2020.05.29 01:37 [1018817] smart asset 3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar > SELF 0.00000000 MOITOKEN
{
"type": 15,
"id": "H1U3CBEy4y6YBg9N3cwN4XkLWwKLkgQ5mhvCuWq2FMD4",
"fee": 100000000,
"feeAssetId": null,
"timestamp": 1590705425872,
"version": 1,
"sender": "3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar",
"senderPublicKey": "BUxg9XtvamV81CZCqrQzi8BxCizU41dpSqoqt5mW56XS",
"proofs": [
"yGVnd2hDa1pABc34Evf7roxWAETXeB36E8riVmKHoM6CbS2xeWQEmSWiWscz8LL3E5ih2iq5iWstdf1buVQUcqT"
],
"assetId": "3tqknScoCegnWpFYGvYGiUM68iWC1Fw9KPgHdYgi8ZWc",
"script": "base64:AQQAAAALZEFwcEFkZHJlc3MJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNNeWdRYXdHMmdQam9lajh3WDJjcWt4bWc3S1hBUFA2eGFyBAAAAAdhZG1pblBLAQAAACCbvoDDAKlv8SHnGnzbjcmS7cF3EYTHum5V5rS3JwBICQQAAAAEVVNEVAEAAAAgQgOoh2J3l4MtPENb6Z+x/IVXhnG5IKTf37Twf68JKQwEAAAABFVTRE4BAAAAICJkPx6+YEbpEWoTE9ymM/4Wfgf5d+mz8hX8mUkqMAo3BAAAAAlzZWxsUHJpY2UAAAAAAAAQBZAEAAAACGJ1eVByaWNlAAAAAAAADn7wBAAAAAckbWF0Y2gwBQAAAAJ0eAMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0J1cm5UcmFuc2FjdGlvbgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAGVNldEFzc2V0U2NyaXB0VHJhbnNhY3Rpb24GCQAAAQAAAAIFAAAAByRtYXRjaDACAAAA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018817,
"spentComplexity": 0
}
View: original | compacted
Prev: 5ZUzWJbkL2NBe2x4fLNfhszaES34GUTmogKTWAPhscJq
Next: cwicYTbkzVfr7oES9tmSEiU9UtzgPifL9YyNLBfywmj
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)) |
---|
| 20 | + | else if (if ((e.sellOrder.assetPair.priceAsset != USDT)) |
---|
21 | 21 | | then true |
---|
22 | | - | else (e.sellOrder.assetPair.amountAsset == USDT)) |
---|
| 22 | + | else (e.sellOrder.assetPair.amountAsset != USDT)) |
---|
23 | 23 | | then throw("1111 is being traded in a pair: ADKAR/BTC. Details in the telegram channel @ADKAR_WAVES") |
---|
24 | 24 | | else if (sell) |
---|
25 | 25 | | then if (if ((e.sellOrder.price > sellPrice)) |
---|
|
31 | 31 | | then if ((buyPrice > e.sellOrder.price)) |
---|
32 | 32 | | 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 | 33 | | else true |
---|
34 | | - | else if ((e.sellOrder.assetPair.priceAsset != USDN)) |
---|
| 34 | + | else if (if ((e.sellOrder.assetPair.priceAsset != USDN)) |
---|
| 35 | + | then true |
---|
| 36 | + | else (e.sellOrder.assetPair.amountAsset != USDN)) |
---|
35 | 37 | | then throw("2222 is being traded in a pair: ADKAR/BTC. Details in the telegram channel @ADKAR_WAVES") |
---|
36 | 38 | | else if (sell) |
---|
37 | 39 | | then if (if ((e.sellOrder.price > sellPrice)) |
---|
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)) |
---|
| 20 | + | else if (if ((e.sellOrder.assetPair.priceAsset != USDT)) |
---|
21 | 21 | | then true |
---|
22 | | - | else (e.sellOrder.assetPair.amountAsset == USDT)) |
---|
| 22 | + | else (e.sellOrder.assetPair.amountAsset != USDT)) |
---|
23 | 23 | | then throw("1111 is being traded in a pair: ADKAR/BTC. Details in the telegram channel @ADKAR_WAVES") |
---|
24 | 24 | | else if (sell) |
---|
25 | 25 | | then if (if ((e.sellOrder.price > sellPrice)) |
---|
26 | 26 | | then true |
---|
27 | 27 | | else (buyPrice > e.sellOrder.price)) |
---|
28 | 28 | | 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 | 29 | | else true |
---|
30 | 30 | | else if (buy) |
---|
31 | 31 | | then if ((buyPrice > e.sellOrder.price)) |
---|
32 | 32 | | 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 | 33 | | else true |
---|
34 | | - | else if ((e.sellOrder.assetPair.priceAsset != USDN)) |
---|
| 34 | + | else if (if ((e.sellOrder.assetPair.priceAsset != USDN)) |
---|
| 35 | + | then true |
---|
| 36 | + | else (e.sellOrder.assetPair.amountAsset != USDN)) |
---|
35 | 37 | | then throw("2222 is being traded in a pair: ADKAR/BTC. Details in the telegram channel @ADKAR_WAVES") |
---|
36 | 38 | | else if (sell) |
---|
37 | 39 | | then if (if ((e.sellOrder.price > sellPrice)) |
---|
38 | 40 | | then true |
---|
39 | 41 | | else (buyPrice > e.sellOrder.price)) |
---|
40 | 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") |
---|
41 | 43 | | else true |
---|
42 | 44 | | else if (buy) |
---|
43 | 45 | | then if ((buyPrice > e.sellOrder.price)) |
---|
44 | 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") |
---|
45 | 47 | | else true |
---|
46 | 48 | | else throw("Something bad happened") |
---|
47 | 49 | | case _ => |
---|
48 | 50 | | false |
---|
49 | 51 | | } |
---|