tx · DgnihLAbJnCk12qJew6bH772ZdCyheL88AvNuh3Q9DP3 3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar: -1.00000000 Waves 2020.05.31 23:30 [1023173] smart asset 3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar > SELF 0.00000000 MOITOKEN
{ "type": 15, "id": "DgnihLAbJnCk12qJew6bH772ZdCyheL88AvNuh3Q9DP3", "fee": 100000000, "feeAssetId": null, "timestamp": 1590957095519, "version": 1, "sender": "3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar", "senderPublicKey": "BUxg9XtvamV81CZCqrQzi8BxCizU41dpSqoqt5mW56XS", "proofs": [ "2649rhZQ9kYtEMm4La5wDrmd7xd9PRiWEwUxX5aRxy8AE9FZAS6nXVBg5fVNpmzm94n4mEw7Mbysjt37Usme5D9S" ], "assetId": "3tqknScoCegnWpFYGvYGiUM68iWC1Fw9KPgHdYgi8ZWc", "script": "base64:AQQAAAALZEFwcEFkZHJlc3MJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNNeWdRYXdHMmdQam9lajh3WDJjcWt4bWc3S1hBUFA2eGFyBAAAAAdhZG1pblBLAQAAACCbvoDDAKlv8SHnGnzbjcmS7cF3EYTHum5V5rS3JwBICQQAAAAHJG1hdGNoMAUAAAACdHgDAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9CdXJuVHJhbnNhY3Rpb24GAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABlTZXRBc3NldFNjcmlwdFRyYW5zYWN0aW9uBgkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABJSZWlzc3VlVHJhbnNhY3Rpb24EAAAAAnR4BQAAAAckbWF0Y2gwCQAAAAAAAAIIBQAAAAJ0eAAAAAZzZW5kZXIFAAAAC2RBcHBBZGRyZXNzAwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgYJAAABAAAAAgUAAAAHJG1hdGNoMAI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3KboMqssRZgX2HtUkBd Diff:
Old | New | Differences | |
---|---|---|---|
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let dAppAddress = addressFromString("3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar") | |
4 | 4 | let adminPK = base58'BUxg9XtvamV81CZCqrQzi8BxCizU41dpSqoqt5mW56XS' | |
5 | - | let USDN = base58'3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC' | |
6 | - | let TestBTC = base58'3afJDTZVMvCdLB3rd1PEY6M7icZj1VkvwBiprVRbfD3a' | |
7 | - | let TestUSD = base58'88922xdkSYjAPeqSGp6K22Tmkr43DGBZbbPDLK1sT6U8' | |
8 | - | let USDUSD = base58'6haPPnD5NNMGsif6Zbr67L5xBEM9Dn54qAWpwGvydDSU' | |
9 | - | let sellPrice = 1050000 | |
10 | - | let buyPrice = 950000 | |
11 | 5 | match tx { | |
12 | 6 | case tx: BurnTransaction|SetAssetScriptTransaction|ReissueTransaction => | |
13 | 7 | (tx.sender == dAppAddress) | |
14 | 8 | case tx: TransferTransaction|MassTransferTransaction => | |
15 | - | | |
9 | + | (tx.sender == dAppAddress) | |
16 | 10 | case e: ExchangeTransaction => | |
17 | - | if (if ((e.sellOrder.assetPair.priceAsset == TestBTC)) | |
11 | + | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
12 | + | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) | |
13 | + | if (admin) | |
18 | 14 | then true | |
19 | - | else (e.sellOrder.assetPair.amountAsset == TestBTC)) | |
20 | - | then true | |
21 | - | else if (if ((e.sellOrder.assetPair.priceAsset == TestUSD)) | |
22 | - | then true | |
23 | - | else (e.sellOrder.assetPair.amountAsset == TestUSD)) | |
24 | - | then true | |
25 | - | else if (if ((e.sellOrder.assetPair.priceAsset == USDUSD)) | |
26 | - | then true | |
27 | - | else (e.sellOrder.assetPair.amountAsset == USDUSD)) | |
28 | - | then true | |
29 | - | else { | |
30 | - | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
31 | - | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
32 | - | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) | |
33 | - | if (admin) | |
34 | - | then true | |
35 | - | else if (if ((e.sellOrder.assetPair.priceAsset != USDN)) | |
36 | - | then true | |
37 | - | else (e.sellOrder.assetPair.amountAsset != USDN)) | |
38 | - | then throw("USTOT is being traded in a pair: USTOT/USDT. Details in the telegram channel @ADKAR_WAVES") | |
39 | - | else if (sell) | |
40 | - | then if (if ((e.sellOrder.price > sellPrice)) | |
41 | - | then true | |
42 | - | else (buyPrice > e.sellOrder.price)) | |
43 | - | then throw("Trading range 0.95 - 1.05 USDT. Do not write off the sale, in the future tokens will be added for trading in tandem with USTOT. Details in the telegram channel @ADKAR_WAVES") | |
44 | - | else true | |
45 | - | else if (buy) | |
46 | - | then if ((buyPrice > e.sellOrder.price)) | |
47 | - | then throw("The trading range is 0.95 - 1.05 USDT, where 0.95 is the minimum purchase price, while selling at the price of 0.5 USDT, you also need to set the price to 0.95 USDT, otherwise the order will not work. Details in the telegram channel @ADKAR_WAVES") | |
48 | - | else true | |
49 | - | else throw("Something bad happened") | |
50 | - | } | |
15 | + | else if (isDefined(e.sellOrder.assetPair.priceAsset)) | |
16 | + | then throw("только WAVES") | |
17 | + | else if (buy) | |
18 | + | then if ((1 >= e.sellOrder.price)) | |
19 | + | then throw("Минимальная цена на покупку 0.00000002, на продажу нет ограничений") | |
20 | + | else true | |
21 | + | else throw("Something bad happened") | |
51 | 22 | case _ => | |
52 | 23 | false | |
53 | 24 | } |
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 | - | let USDN = base58'3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC' | |
6 | - | let TestBTC = base58'3afJDTZVMvCdLB3rd1PEY6M7icZj1VkvwBiprVRbfD3a' | |
7 | - | let TestUSD = base58'88922xdkSYjAPeqSGp6K22Tmkr43DGBZbbPDLK1sT6U8' | |
8 | - | let USDUSD = base58'6haPPnD5NNMGsif6Zbr67L5xBEM9Dn54qAWpwGvydDSU' | |
9 | - | let sellPrice = 1050000 | |
10 | - | let buyPrice = 950000 | |
11 | 5 | match tx { | |
12 | 6 | case tx: BurnTransaction|SetAssetScriptTransaction|ReissueTransaction => | |
13 | 7 | (tx.sender == dAppAddress) | |
14 | 8 | case tx: TransferTransaction|MassTransferTransaction => | |
15 | - | | |
9 | + | (tx.sender == dAppAddress) | |
16 | 10 | case e: ExchangeTransaction => | |
17 | - | if (if ((e.sellOrder.assetPair.priceAsset == TestBTC)) | |
11 | + | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
12 | + | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) | |
13 | + | if (admin) | |
18 | 14 | then true | |
19 | - | else (e.sellOrder.assetPair.amountAsset == TestBTC)) | |
20 | - | then true | |
21 | - | else if (if ((e.sellOrder.assetPair.priceAsset == TestUSD)) | |
22 | - | then true | |
23 | - | else (e.sellOrder.assetPair.amountAsset == TestUSD)) | |
24 | - | then true | |
25 | - | else if (if ((e.sellOrder.assetPair.priceAsset == USDUSD)) | |
26 | - | then true | |
27 | - | else (e.sellOrder.assetPair.amountAsset == USDUSD)) | |
28 | - | then true | |
29 | - | else { | |
30 | - | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
31 | - | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
32 | - | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) | |
33 | - | if (admin) | |
34 | - | then true | |
35 | - | else if (if ((e.sellOrder.assetPair.priceAsset != USDN)) | |
36 | - | then true | |
37 | - | else (e.sellOrder.assetPair.amountAsset != USDN)) | |
38 | - | then throw("USTOT is being traded in a pair: USTOT/USDT. Details in the telegram channel @ADKAR_WAVES") | |
39 | - | else if (sell) | |
40 | - | then if (if ((e.sellOrder.price > sellPrice)) | |
41 | - | then true | |
42 | - | else (buyPrice > e.sellOrder.price)) | |
43 | - | then throw("Trading range 0.95 - 1.05 USDT. Do not write off the sale, in the future tokens will be added for trading in tandem with USTOT. Details in the telegram channel @ADKAR_WAVES") | |
44 | - | else true | |
45 | - | else if (buy) | |
46 | - | then if ((buyPrice > e.sellOrder.price)) | |
47 | - | then throw("The trading range is 0.95 - 1.05 USDT, where 0.95 is the minimum purchase price, while selling at the price of 0.5 USDT, you also need to set the price to 0.95 USDT, otherwise the order will not work. Details in the telegram channel @ADKAR_WAVES") | |
48 | - | else true | |
49 | - | else throw("Something bad happened") | |
50 | - | } | |
15 | + | else if (isDefined(e.sellOrder.assetPair.priceAsset)) | |
16 | + | then throw("только WAVES") | |
17 | + | else if (buy) | |
18 | + | then if ((1 >= e.sellOrder.price)) | |
19 | + | then throw("Минимальная цена на покупку 0.00000002, на продажу нет ограничений") | |
20 | + | else true | |
21 | + | else throw("Something bad happened") | |
51 | 22 | case _ => | |
52 | 23 | false | |
53 | 24 | } |
github/deemru/w8io/169f3d6 26.92 ms ◑