tx · 6CMvtPUPuFWXv2Lc2YDKRRMQFAjGw3gqaq92FxpQRJuv 3N5EryX3TucbwUpnjryZB3WLg3YDTcC9BbF: -1.00000000 Waves 2020.04.20 18:33 [962985] smart asset 3N5EryX3TucbwUpnjryZB3WLg3YDTcC9BbF > SELF 0.00000000 Test0003
{ "type": 15, "id": "6CMvtPUPuFWXv2Lc2YDKRRMQFAjGw3gqaq92FxpQRJuv", "fee": 100000000, "feeAssetId": null, "timestamp": 1587396811255, "version": 1, "sender": "3N5EryX3TucbwUpnjryZB3WLg3YDTcC9BbF", "senderPublicKey": "B9XyW4GriR4NKr6yyp8ZS5BmRzTXAhBn9jybWtpDhQKk", "proofs": [ "4W6TX5d1fSbMWddAGa7wfvqm41PPNaXGtf5eN41766iDApiZkqy5nxfyRyT2Xdcxd7udjy1VtDwXrTeFcHJEAr2M" ], "assetId": "G1sibUnEzT74RZLcP4Y6gEc8QCNhZLHaS5KKGksraacv", "script": "base64:AgQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAAXQFAAAAByRtYXRjaDAJAAAAAAAAAggFAAAAAXQAAAAKZmVlQXNzZXRJZAEAAAAgHJ17gLUd4IKCP38U/wZ0PHkEoJXlYsp9iF+mKuXuiRsGdpNdJw==", "chainId": 84, "height": 962985, "spentComplexity": 0 } View: original | compacted Prev: 2CPFiqCzSWzmecbPw49pvhjv9qXWaTUhniUx2yt5bA9N Next: us2R7V7pPMayDiTTGKVMJNoK14W3V43QhWFjUQrek6B Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 2 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | - | let adminPK = base58'B9XyW4GriR4NKr6yyp8ZS5BmRzTXAhBn9jybWtpDhQKk' | |
4 | - | let sellAmount = 1000000000 | |
5 | - | let sellPrice = 100 | |
6 | - | let buyPrice = 90 | |
7 | 3 | match tx { | |
8 | - | case e: ExchangeTransaction => | |
9 | - | let sender = e.sellOrder.sender | |
10 | - | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
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) | |
14 | - | then true | |
15 | - | else if (isDefined(e.sellOrder.assetPair.priceAsset)) | |
16 | - | then throw("Only waves accepted") | |
17 | - | else if (sell) | |
18 | - | then if ((sellAmount > e.sellOrder.amount)) | |
19 | - | then throw(("Sell amount must be greater or equal to " + toString((sellAmount / 100000000)))) | |
20 | - | else if ((sellPrice >= e.sellOrder.price)) | |
21 | - | then throw((("Sell price must be greater than " + toString(sellPrice)) + " wavelets")) | |
22 | - | else true | |
23 | - | else if (buy) | |
24 | - | then if ((buyPrice >= e.sellOrder.price)) | |
25 | - | then throw((("Buy price must be greater then " + toString(buyPrice)) + " wavelets")) | |
26 | - | else true | |
27 | - | else throw("something bad happened") | |
28 | - | case _: BurnTransaction => | |
29 | - | false | |
4 | + | case t: TransferTransaction => | |
5 | + | (t.feeAssetId == base58'2vhhEwXpTpHKq8rnyLy3WGkQ4CLpFN5GZPyBiVKWKnG2') | |
30 | 6 | case _ => | |
31 | 7 | true | |
32 | 8 | } |
github/deemru/w8io/169f3d6 30.59 ms ◑