tx · 2ceYfDKKt5BSJQ9gR52HwpBXkEcHixeLadgkN5yEBAu9 3N5EryX3TucbwUpnjryZB3WLg3YDTcC9BbF: -1.00000000 Waves 2020.04.18 22:13 [960345] smart asset 3N5EryX3TucbwUpnjryZB3WLg3YDTcC9BbF > SELF 0 SUPER
{ "type": 15, "id": "2ceYfDKKt5BSJQ9gR52HwpBXkEcHixeLadgkN5yEBAu9", "fee": 100000000, "feeAssetId": null, "timestamp": 1587237189879, "version": 1, "sender": "3N5EryX3TucbwUpnjryZB3WLg3YDTcC9BbF", "senderPublicKey": "B9XyW4GriR4NKr6yyp8ZS5BmRzTXAhBn9jybWtpDhQKk", "proofs": [ "2kjbzMWsQzwaNhLsgrW3zETZ7PJz9uMk3MHA9A6cWU7h88oEPatLmYPcR8FF1bSaD6sRTuykNyVSBgWTVYRcDxux" ], "assetId": "DHKgdp6r2f6tpFb2fd3aTtBFQAwXgd3jogPMgniLZaDN", "script": "base64:AgQAAAAHYWRtaW5QSwEAAAAglsSJz6KFUcFtfApcMGPSTcbUtji15ZrrZdwT1HPy9xsEAAAACnNlbGxBbW91bnQAAAAAADuaygAEAAAACXNlbGxQcmljZQAAAAAAAAAD6AQAAAAIYnV5UHJpY2UAAAAAAAAAA4QEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNFeGNoYW5nZVRyYW5zYWN0aW9uBAAAAAFlBQAAAAckbWF0Y2gwBAAAAAZzZW5kZXIICAUAAAABZQAAAAlzZWxsT3JkZXIAAAAGc2VuZGVyBAAAAARzZWxsCQAB9AAAAAMICAUAAAABZQAAAAlzZWxsT3JkZXIAAAAJYm9keUJ5dGVzCQABkQAAAAIICAUAAAABZQAAAAlzZWxsT3JkZXIAAAAGcHJvb2ZzAAAAAAAAAAAACAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAAD3NlbmRlclB1YmxpY0tleQQAAAADYnV5CQAB9AAAAAMICAUAAAABZQAAAAhidXlPcmRlcgA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mVkAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9CdXJuVHJhbnNhY3Rpb24HBqKojHs=", "chainId": 84, "height": 960345, "spentComplexity": 0 } View: original | compacted Prev: none Next: BWtwz5A6HBJtiFMxLsQMAGJBSAqjSjEQpCxdWePjht3d Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 2 #-} | |
2 | + | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | + | let adminPK = base58'B9XyW4GriR4NKr6yyp8ZS5BmRzTXAhBn9jybWtpDhQKk' | |
4 | + | let sellAmount = 1000000000 | |
5 | + | let sellPrice = 1000 | |
6 | + | let buyPrice = 900 | |
7 | + | 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 | |
30 | + | case _ => | |
31 | + | true | |
32 | + | } |
github/deemru/w8io/169f3d6 16.21 ms ◑