tx · 47wu33hqaJF3pb7WZ1i2NjicQnonmutEjbRwfcHo1hQ6
3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar: -1.00000000 Waves
2020.05.26 09:09 [1014897] smart asset 3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar > SELF 0.00000000 MOITOKEN
{
"type": 15,
"id": "47wu33hqaJF3pb7WZ1i2NjicQnonmutEjbRwfcHo1hQ6",
"fee": 100000000,
"feeAssetId": null,
"timestamp": 1590473403165,
"version": 1,
"sender": "3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar",
"senderPublicKey": "BUxg9XtvamV81CZCqrQzi8BxCizU41dpSqoqt5mW56XS",
"proofs": [
"3RY4w2Hy3LjoawkQxfbmipA3Vp4EUaZaNxhG6GiRtX4VLideLJKicWtCTtg4BeP5vZYvjrTveMzPZUgL8RWhYPzK"
],
"assetId": "3tqknScoCegnWpFYGvYGiUM68iWC1Fw9KPgHdYgi8ZWc",
"script": "base64:AQQAAAALZEFwcEFkZHJlc3MJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNNeWdRYXdHMmdQam9lajh3WDJjcWt4bWc3S1hBUFA2eGFyBAAAAAdhZG1pblBLAQAAACCbvoDDAKlv8SHnGnzbjcmS7cF3EYTHum5V5rS3JwBICQQAAAAFQlRDSWQBAAAAICZW18edbVw5IUDUbKCl7CbP+JI8377yHi104yBIibXVBAAAAAVVU0RJZAEAAAAgadXwn0S4hl1jVhAJyD0lkaiOX1QUdPc+9ZwqbMIh9QkEAAAACXNlbGxQcmljZQAAAAAABkIsQAQAAAAIYnV5UHJpY2UAAAAAAAWplcAEAAAAByRtYXRjaDAFAAAAAnR4AwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPQnVyblRyYW5zYWN0aW9uBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAZU2V0QXNzZXRTY3JpcHRUcmFuc2FjdGlvbgYJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAASUmVpc3N1ZVRyYW5zYWN0aW9uBAAAAAJ0eAUAAAAHJG1hdGNoMAkAAAAAAAACCAUAAAACdHgAAAAGc2VuZGVyBQAAAAtkQXBwQWRkcmVzcwMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24GCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAF01hc3NUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAJ0eAUAAAAHJG1hdGNoMAYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE0V4Y2hhbmdlVHJhbnNhY3Rpb24EAAAAAWUFAAAAByRtYXRjaDADCQAAAAAAAAIICAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAACWFzc2V0UGFpcgAAAApwcmljZUFzc2V0BQAAAAVVU0RJZAYDCQEAAAACIT0AAAACCAgIBQAAAAFlAAAACXNlbGxPcmRlcgAAAAlhc3NldFBhaXIAAAAKcHJpY2VBc3NldAUAAAAFQlRDSWQJAAACAAAAAQIAAABbVU5SRUFMIGlzIGJlaW5nIHRyYWRlZCBpbiBhIHBhaXI6IFVOUkVBTC9CVEMuIERldGFpbHMgaW4gdGhlIHRlbGVncmFtIGNoYW5uZWwgQFVOUkVBTF9XQVZFUwYH8ikB2Q==",
"chainId": 84,
"height": 1014897,
"spentComplexity": 0
}
View: original | compacted
Prev: 2txk1AyNUR72qtUMWRKXsDdUjFavFWSZzXZmKAsYid62
Next: BLnP6CTt798JLyEoVrupJVGLSUZrEz3Kskw13fRFZrf2
Diff:
Old | New | | Differences |
---|
12 | 12 | | case tx: TransferTransaction|MassTransferTransaction => |
---|
13 | 13 | | true |
---|
14 | 14 | | case e: ExchangeTransaction => |
---|
15 | | - | let sender = e.sellOrder.sender |
---|
16 | | - | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) |
---|
17 | | - | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) |
---|
18 | | - | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) |
---|
19 | 15 | | if ((e.sellOrder.assetPair.priceAsset == USDId)) |
---|
20 | 16 | | then true |
---|
21 | | - | else if (admin) |
---|
22 | | - | then true |
---|
23 | | - | else if ((e.sellOrder.assetPair.priceAsset != BTCId)) |
---|
24 | | - | then throw("UNREAL is being traded in a pair: UNREAL/BTC. Details in the telegram channel @UNREAL_WAVES") |
---|
25 | | - | else if (sell) |
---|
26 | | - | then if (if ((e.sellOrder.price > sellPrice)) |
---|
27 | | - | then true |
---|
28 | | - | else (buyPrice > e.sellOrder.price)) |
---|
29 | | - | 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") |
---|
30 | | - | else true |
---|
31 | | - | else if (buy) |
---|
32 | | - | then if ((buyPrice > e.sellOrder.price)) |
---|
33 | | - | 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") |
---|
34 | | - | else true |
---|
35 | | - | else throw("something bad happened") |
---|
| 17 | + | else if ((e.sellOrder.assetPair.priceAsset != BTCId)) |
---|
| 18 | + | then throw("UNREAL is being traded in a pair: UNREAL/BTC. Details in the telegram channel @UNREAL_WAVES") |
---|
| 19 | + | else true |
---|
36 | 20 | | case _ => |
---|
37 | 21 | | false |
---|
38 | 22 | | } |
---|
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 BTCId = base58'3afJDTZVMvCdLB3rd1PEY6M7icZj1VkvwBiprVRbfD3a' |
---|
6 | 6 | | let USDId = base58'88922xdkSYjAPeqSGp6K22Tmkr43DGBZbbPDLK1sT6U8' |
---|
7 | 7 | | let sellPrice = 105000000 |
---|
8 | 8 | | let buyPrice = 95000000 |
---|
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 | | - | let sender = e.sellOrder.sender |
---|
16 | | - | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) |
---|
17 | | - | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) |
---|
18 | | - | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) |
---|
19 | 15 | | if ((e.sellOrder.assetPair.priceAsset == USDId)) |
---|
20 | 16 | | then true |
---|
21 | | - | else if (admin) |
---|
22 | | - | then true |
---|
23 | | - | else if ((e.sellOrder.assetPair.priceAsset != BTCId)) |
---|
24 | | - | then throw("UNREAL is being traded in a pair: UNREAL/BTC. Details in the telegram channel @UNREAL_WAVES") |
---|
25 | | - | else if (sell) |
---|
26 | | - | then if (if ((e.sellOrder.price > sellPrice)) |
---|
27 | | - | then true |
---|
28 | | - | else (buyPrice > e.sellOrder.price)) |
---|
29 | | - | 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") |
---|
30 | | - | else true |
---|
31 | | - | else if (buy) |
---|
32 | | - | then if ((buyPrice > e.sellOrder.price)) |
---|
33 | | - | 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") |
---|
34 | | - | else true |
---|
35 | | - | else throw("something bad happened") |
---|
| 17 | + | else if ((e.sellOrder.assetPair.priceAsset != BTCId)) |
---|
| 18 | + | then throw("UNREAL is being traded in a pair: UNREAL/BTC. Details in the telegram channel @UNREAL_WAVES") |
---|
| 19 | + | else true |
---|
36 | 20 | | case _ => |
---|
37 | 21 | | false |
---|
38 | 22 | | } |
---|