tx · 74ogZGU6tyCG8zANYj6CDrVTh2C1SGLsqzdLF8c5zBAW
3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar: -1.00000000 Waves
2020.05.29 10:25 [1019433] smart asset 3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar > SELF 0.00000000 MOITOKEN
{
"type": 15,
"id": "74ogZGU6tyCG8zANYj6CDrVTh2C1SGLsqzdLF8c5zBAW",
"fee": 100000000,
"feeAssetId": null,
"timestamp": 1590737199560,
"version": 1,
"sender": "3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar",
"senderPublicKey": "BUxg9XtvamV81CZCqrQzi8BxCizU41dpSqoqt5mW56XS",
"proofs": [
"5442S5sURrqNQySa9VtrTmMA3F5vLMSUmuwifYPca1td9isDXcCPJR9rUbEVeYbfVWL6cNiPdUCZ11bRA3K9uZ3m"
],
"assetId": "3tqknScoCegnWpFYGvYGiUM68iWC1Fw9KPgHdYgi8ZWc",
"script": "base64:AQQAAAALZEFwcEFkZHJlc3MJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNNeWdRYXdHMmdQam9lajh3WDJjcWt4bWc3S1hBUFA2eGFyBAAAAAdhZG1pblBLAQAAACCbvoDDAKlv8SHnGnzbjcmS7cF3EYTHum5V5rS3JwBICQQAAAAEVVNETgEAAAAgImQ/Hr5gRukRahMT3KYz/hZ+B/l36bPyFfyZSSowCjcEAAAACXNlbGxQcmljZQAAAAAAABAFkAQAAAAIYnV5UHJpY2UAAAAAAAAOfvAEAAAAByRtYXRjaDAFAAAAAnR4AwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPQnVyblRyYW5zYWN0aW9uBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAZU2V0QXNzZXRTY3JpcHRUcmFuc2FjdGlvbgYJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAASUmVpc3N1ZVRyYW5zYWN0aW9uBAAAAAJ0eAUAAAAHJG1hdGNoMAkAAAAAAAACCA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T3JkZXIAAAAFcHJpY2UFAAAACXNlbGxQcmljZQYJAABmAAAAAgUAAAAIYnV5UHJpY2UICAUAAAABZQAAAAlzZWxsT3JkZXIAAAAFcHJpY2UJAAACAAAAAQIAAACsVHJhZGluZyByYW5nZSAwLjk1IC0gMS4wNSBVU0ROLiBEbyBub3Qgd3JpdGUgb2ZmIHRoZSBzYWxlLCBpbiB0aGUgZnV0dXJlIHRva2VucyB3aWxsIGJlIGFkZGVkIGZvciB0cmFkaW5nIGluIHRhbmRlbSB3aXRoIFVTTk9OLiBEZXRhaWxzIGluIHRoZSB0ZWxlZ3JhbSBjaGFubmVsIEBBREtBUl9XQVZFUwYDBQAAAANidXkDCQAAZgAAAAIFAAAACGJ1eVByaWNlCAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAABXByaWNlCQAAAgAAAAECAAAA9VRoZSB0cmFkaW5nIHJhbmdlIGlzIDAuOTUgLSAxLjA1IFVTRE4sIHdoZXJlIDAuOTUgaXMgdGhlIG1pbmltdW0gcHVyY2hhc2UgcHJpY2UsIHdoaWxlIHNlbGxpbmcgYXQgdGhlIHByaWNlIG9mIDAuNSBVU0ROLCB5b3UgYWxzbyBuZWVkIHRvIHNldCB0aGUgcHJpY2UgdG8gMC45NSBVU0ROLCBvdGhlcndpc2UgdGhlIG9yZGVyIHdpbGwgbm90IHdvcmsuIERldGFpbHMgaW4gdGhlIHRlbGVncmFtIGNoYW5uZWwgQEFES0FSX1dBVkVTBgkAAAIAAAABAgAAABZTb21ldGhpbmcgYmFkIGhhcHBlbmVkB4PghlY=",
"chainId": 84,
"height": 1019433,
"spentComplexity": 0
}
View: original | compacted
Prev: C3r77AVmmpVnxfRRJ1fPATfMt2tXZ7RkZMHDh4ur11Vu
Next: FBQBNg1YNvugcfCpzJwp2TDpGrHtGcpa6qUkfbXPd5Sm
Diff:
Old | New | | Differences |
---|
3 | 3 | | let dAppAddress = addressFromString("3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar") |
---|
4 | 4 | | let adminPK = base58'BUxg9XtvamV81CZCqrQzi8BxCizU41dpSqoqt5mW56XS' |
---|
5 | 5 | | let USDN = base58'3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC' |
---|
6 | | - | let USDUSD = base58'6haPPnD5NNMGsif6Zbr67L5xBEM9Dn54qAWpwGvydDSU' |
---|
7 | 6 | | let sellPrice = 1050000 |
---|
8 | 7 | | let buyPrice = 950000 |
---|
9 | 8 | | match tx { |
---|
|
17 | 16 | | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) |
---|
18 | 17 | | if (admin) |
---|
19 | 18 | | then true |
---|
20 | | - | else if (if ((e.sellOrder.assetPair.priceAsset != USDN)) |
---|
21 | | - | then true |
---|
22 | | - | else (e.sellOrder.assetPair.priceAsset != USDUSD)) |
---|
23 | | - | then throw("1111 is being traded in a pair: ADKAR/BTC. Details in the telegram channel @ADKAR_WAVES") |
---|
| 19 | + | else if ((e.sellOrder.assetPair.priceAsset != USDN)) |
---|
| 20 | + | then throw("USNON is being traded in a pair: USNON/USDN. Details in the telegram channel @ADKAR_WAVES") |
---|
24 | 21 | | else if (sell) |
---|
25 | 22 | | then if (if ((e.sellOrder.price > sellPrice)) |
---|
26 | 23 | | then true |
---|
27 | 24 | | else (buyPrice > e.sellOrder.price)) |
---|
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") |
---|
| 25 | + | then throw("Trading range 0.95 - 1.05 USDN. Do not write off the sale, in the future tokens will be added for trading in tandem with USNON. Details in the telegram channel @ADKAR_WAVES") |
---|
29 | 26 | | else true |
---|
30 | 27 | | else if (buy) |
---|
31 | 28 | | then if ((buyPrice > e.sellOrder.price)) |
---|
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") |
---|
| 29 | + | then throw("The trading range is 0.95 - 1.05 USDN, where 0.95 is the minimum purchase price, while selling at the price of 0.5 USDN, you also need to set the price to 0.95 USDN, otherwise the order will not work. Details in the telegram channel @ADKAR_WAVES") |
---|
33 | 30 | | else true |
---|
34 | 31 | | else throw("Something bad happened") |
---|
35 | 32 | | case _ => |
---|
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 USDN = base58'3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC' |
---|
6 | | - | let USDUSD = base58'6haPPnD5NNMGsif6Zbr67L5xBEM9Dn54qAWpwGvydDSU' |
---|
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 | | - | else if (if ((e.sellOrder.assetPair.priceAsset != USDN)) |
---|
21 | | - | then true |
---|
22 | | - | else (e.sellOrder.assetPair.priceAsset != USDUSD)) |
---|
23 | | - | then throw("1111 is being traded in a pair: ADKAR/BTC. Details in the telegram channel @ADKAR_WAVES") |
---|
| 19 | + | else if ((e.sellOrder.assetPair.priceAsset != USDN)) |
---|
| 20 | + | then throw("USNON is being traded in a pair: USNON/USDN. Details in the telegram channel @ADKAR_WAVES") |
---|
24 | 21 | | else if (sell) |
---|
25 | 22 | | then if (if ((e.sellOrder.price > sellPrice)) |
---|
26 | 23 | | then true |
---|
27 | 24 | | else (buyPrice > e.sellOrder.price)) |
---|
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") |
---|
| 25 | + | then throw("Trading range 0.95 - 1.05 USDN. Do not write off the sale, in the future tokens will be added for trading in tandem with USNON. Details in the telegram channel @ADKAR_WAVES") |
---|
29 | 26 | | else true |
---|
30 | 27 | | else if (buy) |
---|
31 | 28 | | then if ((buyPrice > e.sellOrder.price)) |
---|
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") |
---|
| 29 | + | then throw("The trading range is 0.95 - 1.05 USDN, where 0.95 is the minimum purchase price, while selling at the price of 0.5 USDN, you also need to set the price to 0.95 USDN, otherwise the order will not work. Details in the telegram channel @ADKAR_WAVES") |
---|
33 | 30 | | else true |
---|
34 | 31 | | else throw("Something bad happened") |
---|
35 | 32 | | case _ => |
---|
36 | 33 | | false |
---|
37 | 34 | | } |
---|