tx · 78c1xn6t9KGn7mGBtq7ZNrXaD3KboMqssRZgX2HtUkBd
3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar: -1.00000000 Waves
2020.05.31 23:50 [1023189] smart asset 3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar > SELF 0.00000000 MOITOKEN
{
"type": 15,
"id": "78c1xn6t9KGn7mGBtq7ZNrXaD3KboMqssRZgX2HtUkBd",
"fee": 100000000,
"feeAssetId": null,
"timestamp": 1590958232146,
"version": 1,
"sender": "3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar",
"senderPublicKey": "BUxg9XtvamV81CZCqrQzi8BxCizU41dpSqoqt5mW56XS",
"proofs": [
"2nVDabxiFXMiZnRrRaCQfwYrv7hLod5rsrojWxkzbz2E4f4WMhKMKkCb1DhMiXRZMzBZWMiTGtKTHqnAuLDABMuK"
],
"assetId": "3tqknScoCegnWpFYGvYGiUM68iWC1Fw9KPgHdYgi8ZWc",
"script": "base64:AQQAAAALZEFwcEFkZHJlc3MJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNNeWdRYXdHMmdQam9lajh3WDJjcWt4bWc3S1hBUFA2eGFyBAAAAAdhZG1pblBLAQAAACCbvoDDAKlv8SHnGnzbjcmS7cF3EYTHum5V5rS3JwBICQQAAAAHJG1hdGNoMAUAAAACdHgDAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9CdXJuVHJhbnNhY3Rpb24GAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABlTZXRBc3NldFNjcmlwdFRyYW5zYWN0aW9uBgkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABJSZWlzc3VlVHJhbnNhY3Rpb24EAAAAAnR4BQAAAAckbWF0Y2gwCQAAAAAAAAIIBQAAAAJ0eAAAAAZzZW5kZXIFAAAAC2RBcHBBZGRyZXNzAwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgYJAAABAAAAA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9GM0L3QsNGPINGG0LXQvdCwINC90LAg0L/QvtC60YPQv9C60YMgMC4wMDAwMDAwMiwg0L3QsCDQv9GA0L7QtNCw0LbRgyDQvdC10YIg0L7Qs9GA0LDQvdC40YfQtdC90LjQuQYJAAACAAAAAQIAAAAWU29tZXRoaW5nIGJhZCBoYXBwZW5lZAfarHQm",
"chainId": 84,
"height": 1023189,
"spentComplexity": 0
}
View: original | compacted
Prev: DgnihLAbJnCk12qJew6bH772ZdCyheL88AvNuh3Q9DP3
Next: HDvQHAq125PEtZKoxyGHcabjLHWhK2bxtdAwgPFBr3sd
Diff:
Old | New | | Differences |
---|
8 | 8 | | case tx: TransferTransaction|MassTransferTransaction => |
---|
9 | 9 | | (tx.sender == dAppAddress) |
---|
10 | 10 | | case e: ExchangeTransaction => |
---|
| 11 | + | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) |
---|
11 | 12 | | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) |
---|
12 | 13 | | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) |
---|
13 | 14 | | if (admin) |
---|
14 | 15 | | then true |
---|
15 | 16 | | else if (isDefined(e.sellOrder.assetPair.priceAsset)) |
---|
16 | 17 | | then throw("только WAVES") |
---|
17 | | - | else if (buy) |
---|
18 | | - | then if ((1 >= e.sellOrder.price)) |
---|
19 | | - | then throw("Минимальная цена на покупку 0.00000002, на продажу нет ограничений") |
---|
| 18 | + | else if (sell) |
---|
| 19 | + | then if ((e.sellOrder.price == 0)) |
---|
| 20 | + | then throw("0") |
---|
20 | 21 | | else true |
---|
21 | | - | else throw("Something bad happened") |
---|
| 22 | + | else if (buy) |
---|
| 23 | + | then if ((1 >= e.sellOrder.price)) |
---|
| 24 | + | then throw("Минимальная цена на покупку 0.00000002, на продажу нет ограничений") |
---|
| 25 | + | else true |
---|
| 26 | + | else throw("Something bad happened") |
---|
22 | 27 | | case _ => |
---|
23 | 28 | | false |
---|
24 | 29 | | } |
---|
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 | | match tx { |
---|
6 | 6 | | case tx: BurnTransaction|SetAssetScriptTransaction|ReissueTransaction => |
---|
7 | 7 | | (tx.sender == dAppAddress) |
---|
8 | 8 | | case tx: TransferTransaction|MassTransferTransaction => |
---|
9 | 9 | | (tx.sender == dAppAddress) |
---|
10 | 10 | | case e: ExchangeTransaction => |
---|
| 11 | + | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) |
---|
11 | 12 | | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) |
---|
12 | 13 | | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) |
---|
13 | 14 | | if (admin) |
---|
14 | 15 | | then true |
---|
15 | 16 | | else if (isDefined(e.sellOrder.assetPair.priceAsset)) |
---|
16 | 17 | | then throw("только WAVES") |
---|
17 | | - | else if (buy) |
---|
18 | | - | then if ((1 >= e.sellOrder.price)) |
---|
19 | | - | then throw("Минимальная цена на покупку 0.00000002, на продажу нет ограничений") |
---|
| 18 | + | else if (sell) |
---|
| 19 | + | then if ((e.sellOrder.price == 0)) |
---|
| 20 | + | then throw("0") |
---|
20 | 21 | | else true |
---|
21 | | - | else throw("Something bad happened") |
---|
| 22 | + | else if (buy) |
---|
| 23 | + | then if ((1 >= e.sellOrder.price)) |
---|
| 24 | + | then throw("Минимальная цена на покупку 0.00000002, на продажу нет ограничений") |
---|
| 25 | + | else true |
---|
| 26 | + | else throw("Something bad happened") |
---|
22 | 27 | | case _ => |
---|
23 | 28 | | false |
---|
24 | 29 | | } |
---|